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?
Code: Select all
; 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: Select all
; 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