Page 1 of 1

Strange behavior with button gadget

Posted: Thu Oct 18, 2012 6:00 pm
by Mindphazer
I have noticed something strange with ButtonGadget : in the code below, both gadgetbuttons have the same width (60). One is 25 height, and the other one have 20 height.

Code: Select all

If OpenWindow(#PB_Any, 0, 0, 200, 150, "Test", #PB_Window_SystemMenu | #PB_Window_WindowCentered)
  Button_25 = ButtonGadget(#PB_Any, 50, 50, 60, 25, "...")
  Button_20 = ButtonGadget(#PB_Any, 50, 80, 60, 20, "...")
EndIf
Repeat
  Event  = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
Once they are drawn, they don't seem to have the same width :

Image

If someone can explain, i would be delighted !!

Re: Strange behavior with button gadget

Posted: Thu Oct 18, 2012 6:20 pm
by Polo
I've noticed the width of the 25px height buttons looks incorrect too.

Re: Strange behavior with button gadget

Posted: Thu Oct 18, 2012 6:32 pm
by wilbert
The 25px height button has a different bezel style.

Re: Strange behavior with button gadget

Posted: Thu Oct 18, 2012 6:48 pm
by Mindphazer
wilbert wrote:The 25px height button has a different bezel style.
Right.
It looks like cocoa button style.

Re: Strange behavior with button gadget

Posted: Thu Oct 18, 2012 6:50 pm
by wilbert
Mindphazer wrote:It looks like cocoa button style.
That's correct.
Fred explains it here ...
http://www.purebasic.fr/english/viewtop ... 24&t=51193

Re: Strange behavior with button gadget

Posted: Thu Oct 18, 2012 7:04 pm
by Mindphazer
I understand.
Thank you wilbert