Es ist ja auch kein Menü. Ich sagte ja auch "ToolBar" und bei einer ToolBar gibt es ja auch nichts zum Auf- und Zuklappen.
Aber ja, du hast recht. Sorry. Ich hab das bisher noch nie gesehen. Ich habe mal herumprobiert und habe eine erweiterte Eigenschaft gefunden: TCS_EX_FLATSEPARATORS
Wieder was dazu gelernt und ein neuer Beispielcode für meine WinAPI Library.
Beispielcode:
Code: Alles auswählen
EnableExplicit
Define EventID
#TCS_EX_FLATSEPARATORS = $1
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If PanelGadget(1, 10, 10, WindowWidth(0)-20, WindowHeight(0)-20)
AddGadgetItem(1, -1, "Item 1", 0, 0)
ButtonGadget(2, 100, 100, 100, 20, "Button 1", 0)
AddGadgetItem(1, -1, "Item 2", 0, 0)
ButtonGadget(3, 100, 50, 100, 20, "Button 2", 0)
AddGadgetItem(1, -1, "Item 3", 0, 0)
ButtonGadget(4, 50, 100, 100, 20, "Button 3", 0)
CloseGadgetList()
EndIf
SetWindowLongPtr_(GadgetID(1), #GWL_STYLE, GetWindowLongPtr_(GadgetID(1), #GWL_STYLE) | #TCS_BUTTONS | #TCS_FLATBUTTONS )
SendMessage_(GadgetID(1), #TCM_SETEXTENDEDSTYLE, #Null, #TCS_EX_FLATSEPARATORS)
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
End
EndIf
ForEver
EndIf

