Code: Select all
Enumeration
#Win
#Panel
#Scroll
#Container
#Container2
#Combo
EndEnumeration
LoadFont(iFont18.i, "Arial", 18)
If OpenWindow(#Win, 0, 0, 500, 400, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(#Win, RGB(255,200,255))
SetGadgetFont(#PB_Default, FontID(iFont18))
PanelGadget(#Panel, 5, 5, 490, 390)
AddGadgetItem(#Panel, 0, "Tab 0")
ScrollAreaGadget(#Scroll, 5, 5, 470, 360, 600, 500, 20, #PB_ScrollArea_BorderLess)
ContainerGadget(#Container, 10, 10, 280, 80)
SetGadgetColor(#Container, #PB_Gadget_BackColor, RGB(150,255,200))
ComboBoxGadget(#Combo, 10, 10, 260, 50) ;, #CBS_NOINTEGRALHEIGHT)
SendMessage_(GadgetID(#Combo), #CB_SETITEMHEIGHT, 0, 50)
;Max Combo drop-down height measured from Combo Y ;w ;h
MoveWindow_(GetWindow_(GadgetID(#Combo), #GW_CHILD), 0, 0, 250, 250, #True)
For a = 0 To 50
AddGadgetItem(#Combo, -1,"ComboBox Item " + Str(a))
Next
SetGadgetState(#Combo, 0)
CloseGadgetList()
ContainerGadget(#Container2, 10, 100, 280, 240)
SetGadgetColor(#Container2, #PB_Gadget_BackColor, RGB(200,255,150))
CloseGadgetList()
CloseGadgetList()
AddGadgetItem(#Panel, 1, "Tab 1")
CloseGadgetList()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Any ideas? I think I may need to go back to PlanB and use a toolwindow-button-ListIcon combination........
Edit: Snippet was missing CloseGadgetList() for the ScrollArea gadget