Page 1 of 1

GA_Underscore in CheckBox objects

Posted: Fri Jul 03, 2015 2:42 am
by mritter0
I don't want any shortcut keys for my gadgets, so I put GA_Underscore,0, in all the buttons gadgets. I do so because the text changes in the button gadgets and may have an _ in the text occasionally.

When I do GA_Underscore,0, for CheckBox objects I get a bunch of garbage text appended to the end of the text. See attached image.

It works fine for everything else.

Re: GA_Underscore in CheckBox objects

Posted: Fri Jul 03, 2015 10:12 am
by Daedalus
Hmmm, sounds like using null might do funny things since the labels are probably all null-terminated strings, so all contain a null character that some code somewhere mistakenly decides needs to be underlined. That's what your screenshot looks like anyway - the null at the end of your label is swallowed and the garbage is whatever is in memory after the end of your string.

As a workaround, can you set it to a character that isn't used in any of your strings? Like "%", or maybe even a non-printable character.

Re: GA_Underscore in CheckBox objects

Posted: Fri Jul 03, 2015 11:49 am
by broadblues
try using ~0 not 0

Re: GA_Underscore in CheckBox objects

Posted: Fri Jul 03, 2015 5:28 pm
by mritter0
~0 works. Maybe a note should be made of that in the autodocs......?

Thanks

Re: GA_Underscore in CheckBox objects

Posted: Thu Jul 16, 2015 11:23 am
by salass00
mritter0 wrote: When I do GA_Underscore,0, for CheckBox objects I get a bunch of garbage text appended to the end of the text. See attached image.
The reason is as others have already stated that it tries to underscore the NUL-terminator character.

This bug should be fixed in checkbox.gadget 53.10.