It is currently Sun Dec 16, 2018 6:55 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ComboBoxGadget drop-down size on XP
PostPosted: Wed Oct 31, 2018 7:26 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1666
Hi all. Had to switch to an older PC with Win XP today and noticed that the ComboBoxGadget drop-down size is weird when resized. Check out the snippet below... if you use either 22*dpi or 24*dpi to resize the ComboBoxGadget height, then the drop-down list shows all items. But for some wacky reason, using 23*dpi (the middle number) shows only two items in the list?

However, if you don't use ResizeGadget (see second snippet), then 23*dpi works as expected, like 22 and 24 does. So, a bug with ResizeGadget?

Image

Code:
; For Windows XP using 5.70 beta 2 (32-bit).

If OpenWindow(0, 0, 0, 270, 40, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

  dpi.d=0.96

  ;h=22*dpi ; Works! Shows all 10 drop-down items.
  h=23*dpi ; FAILS: Only shows 2 drop-down items. Why?
  ;h=24*dpi ; Works! Shows all 10 drop-down items.

  ComboBoxGadget(0, 10, 10, 0, h)
  For a = 1 To 10
    AddGadgetItem(0, -1,"ComboBox item " + Str(a))
  Next
 
  SetGadgetState(0, 0)
 
  ResizeGadget(0, #PB_Ignore, #PB_Ignore, 250, #PB_Ignore)

  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

EndIf

Code:
; For Windows XP using 5.70 beta 2 (32-bit).

If OpenWindow(0, 0, 0, 270, 40, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

  dpi.d=0.96

  h=23*dpi ; Works now because ResizeGadget is NOT used!

  ComboBoxGadget(0, 10, 10, 250, h)
  For a = 1 To 10
    AddGadgetItem(0, -1,"ComboBox item " + Str(a))
  Next
 
  SetGadgetState(0, 0)
 
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

EndIf


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye