Page 1 of 1
Funny behavior with ButtonGadget :-)))
Posted: Sat Feb 28, 2026 7:50 pm
by Kwai chang caine
Hello at all
I just realized that if you add "PB_Text_Right" to a ButtonGadget
Code: Select all
ButtonGadget(#Gadget_PN_BtnSearch, 332, 34, 41, 17, "Search", #PB_Text_Right)
it magically transforms into one checkbox
Damn PB, he never ceases to amaze me.
Have a good day
Re: Funny behavior with ButtonGadget :-)))
Posted: Sat Feb 28, 2026 10:14 pm
by jacdelad
On Windows checkboxes and radiobuttons (=OptionGadget) are buttons too. They simply have one additional flag: BS_CHECKBOX and BS_RADIOBUTTON. I have not checked, but I guess BS_CHECKBOX is the same as #PB_Text_Right. This is no "PB magic", sorry...
Read here for more information about that and more styles/flags for buttons:
https://learn.microsoft.com/en-us/windo ... ton-styles
(Try the commandlink

)
Re: Funny behavior with ButtonGadget :-)))
Posted: Sun Mar 01, 2026 8:59 am
by Kwai chang caine
Hello JACDELAD
Aaaah !!!! It's a shame, i believe found a miracle

When we don't know, it's really surprising this behavior

i say to me : "Kcc... You really become old... You even confused them Check and Button... This time... You're really screwed.

Thank you so much for your clear explanation

, you cheered me up. It's neither my fault... nor Fred's.
Have a good day
Re: Funny behavior with ButtonGadget :-)))
Posted: Sun Mar 08, 2026 6:10 am
by Nituvious
KCC you can do this with windows and other gadgets as well, just change the constant to be any number you want and watch for the oddities

Re: Funny behavior with ButtonGadget :-)))
Posted: Sun Mar 08, 2026 10:26 am
by Kwai chang caine
Hello NITUVIOUS
I have discover that because i replace a gadget by another and forget to remove the old constant
Thanks for your wizard recipe !!!
No need to play with fire, I already have problems every day, even when I try to follow the instructions point by point.
You might think that with everything that happens to me, and often only to me, I chase after the troubles, but it's more like trouble is chasing me...and it's fast...believe me.
Have a good day