1. & in string

how can i put & in a label.
everytime i try it comes out _
tnanks
allen

new topic     » topic index » view message » categorize

2. Re: & in string

Allen Ashby wrote:
> 
> 
> how can i put & in a label.
> everytime i try it comes out _
> tnanks
> allen

I'm not very familiar with GUI programming, which I think you are talking about,
but have you tried escaping it with a backslash?

labelstring = "This\&That"

--
"Any programming problem can be solved by adding a level of indirection."
--anonymous
"Any performance problem can be solved by removing a level of indirection."
--M. Haertel
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.

new topic     » goto parent     » topic index » view message » categorize

3. Re: & in string

Allen Ashby wrote:
> 
> 
> how can i put & in a label.
> everytime i try it comes out _
> tnanks
> allen

Ok, I'm assuming you mean ...

When creating a Windows control that has a caption, how can I get '&' to show up
in the caption? Whenever I try, it just underlines the next character instead of
displaying the '&'.

Use '&&' (two ampersands) instead. Windows will replace the two with a one.

Normally, the '&' is used to tell the application which letter is the 'hot key'
for the control so to override this Windows needs to see two adjancent
ampersands.

   
-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu