Re: && in string

new topic     » topic index » view thread      » older message » newer message

Derek Parnell wrote:
> 
> 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


Inside a Hint you may have to repeat it three times to make the ampersand 
be visible; with two: '&&' you will just underline a single character.

try (demo\FindFile.EXW):
constant FindFileButton = create( DefPushButton, {"&Find", "Find Files
&&&Stop"}, TheWindow, 10, 10, 90, 30, 0 )


antonio

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu