LAYOUT_AddChild, Objects[GAD_DETAILS7]=ButtonObject, GA_ID, GAD_DETAILS7, GA_ReadOnly, TRUE, GA_Underscore, "^", GA_Text, "", BUTTON_BevelStyle, BVS_NONE, BUTTON_Transparent, TRUE, BUTTON_Justification, BCJ_LEFT, TAG_DONE),
I use the GA_Underscore like this in all of my button gadgets because I don't want a keyboard shortcut. The text changes and it may have an _ in there occasionally.
Even with the ^ I still get the occasional underscore shortcut implemented when there is no _ in the text. A lot of times on a space character. Is there a better, more reliable way to not get any shortcuts?
I would love a global tag so don't have to put the GA_Underscore in every gadget.
OR
Is there a better gadget/class to use to just show some text, no border, instead of a Button?
I am quite sure that GA_Underscore needs a character, not a string. So it should be GA_Underscore,'^'. If you supply an address instead, the least signifciant byte of the address will be interpreted as a character. So if the address is for example 0x12345620, the space character (0x20) will be used as underscore.
I would use GA_Underscore,0 to disable this feature.
Thinking of another method, you could try LAYOUT_AddImage,LabelObject,...
Try
GA_Underscore, ~0,
or
GA_Underscore, 0,
as thomas suggested.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
Got home from work and did some testing. GA_Underscore,0, does what I want.
Thanks
Using a Label object would work for display purposes but doesn't side step the underscore issue, it would just require IA_Underscore instead....
GA_Underscore, ~0, works better/in more classes.
Reopen this topic.
What is better to use for LABEL_Underscore, '0' or '~0' to disable underscore?
I had in KeyMapSwitcher.docky prefs window source set it to '~0', but with russian catalog some strings show wrong (missing some character), changing it to '0' solves the problem.
But if I change LABEL class/object to use BUTTON class/object setting 'GA_Underscore, ~0,' shows same russian string ok.
So how to know when to use '0' or '~0'? Trial & error?
TIA
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
The fact is that there hasn't been really an official way to disable shortcut processing. A few gadget/image classes supported using 0 for this purpose but far from all of them which is why I've spent time fixing them as well as replacing deprecated function calls and such.
Using ~0 is a hack that really only works as long as your string doesn't contain any 0xff characters (don't know if this is a valid code in any charset).
At least in ISO 8859 charsets, 0xff is a valid code.
OK thx salas00 & gazelle.
So will stick to use '0' instead of '~0' from now. :-)
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P