I just noticed that the ComboBoxGadget seems to ignore the "Height" parameter.
I created one with a height of 300 and filled it with about 150 items. When I drop it down,
it's about twice the specified height, and it extends past the bottom of the window.
Does Windows adjust the ComboBox height based on the number of items in it?
ComboBoxGadget Height Ignored?
André,
Here's a simple example. The ComboBoxGadget height is specified as 100, but it drops down to a much larger size. I think I have (part of) the answer: Windows XP. The comboxbox height is correct if I do not use the "Enable XP skin support" compiler option. If I do use it, the ComboBox height is much bigger than it should be. So it has something to do with XP skin support, right?
Eric
Here's a simple example. The ComboBoxGadget height is specified as 100, but it drops down to a much larger size. I think I have (part of) the answer: Windows XP. The comboxbox height is correct if I do not use the "Enable XP skin support" compiler option. If I do use it, the ComboBox height is much bigger than it should be. So it has something to do with XP skin support, right?
Eric
Code: Select all
;- fill year combobox
Procedure FillYears()
ClearGadgetItemList(2)
For Year.l = 1930 To Year(Date())
AddGadgetItem(2, -1, Str(Year))
Next
EndProcedure
;- open Add Album window
Procedure.l Window_AddAlbum()
If OpenWindow(0,0,0,400,365,#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_Invisible,"Add Album to Database")
If CreateGadgetList(WindowID())
SetGadgetFont(#PB_Default,LoadFont(1,"Arial", 8))
ComboBoxGadget(2,310,60,55,100)
FillYears()
SetGadgetState(2,0)
HideWindow(0,#False)
ProcedureReturn WindowID()
EndIf
EndIf
EndProcedure
;- main event loop
If Window_AddAlbum()
Repeat
EventID.l = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
EndIf
End
