Who understands the splittergadget?
Posted: Sat Jun 07, 2003 7:00 am
The splitter gadget function seems to act like a virtual viewport so absolute gadget positioning doesn't matter and using the visual IDE isn't needed.
I don't quite understand the positioning though, been fiddling and not getting it right.
This produces the desired visual effect. But I am not sure how to adjust this virtual viewport to come up with the first gadget on the left (The treegadget) to the width I want it started at.
Anyone got a clue please?
I don't quite understand the positioning though, been fiddling and not getting it right.
Code: Select all
If OpenWindow(0, 100, 120, 640, 480, #PB_Window_SystemMenu | #PB_Window_SizeGadget, "SGD")
If CreateGadgetList(WindowID())
ListIconGadget(0, 115, 10, 100, 190, "Test", 100)
AddGadgetItem(0, -1, "List Icon Gadget 1")
ListIconGadget(1, 115, 10, 100, 190, "Test", 100)
AddGadgetItem(1, -1, "List Icon Gadget 2")
TreeGadget(3, 115, 10, 100, 190)
AddGadgetItem(3, -1, "This is a tree")
; gadget x y width height gadget1 gadget2 flags
SplitterGadget(2, 0, 0, 0, 0, 3, 0, #PB_Splitter_Vertical)
SplitterGadget(4, 0, 0, 640, 480, 2, 1)
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Gadget
Select EventGadgetID()
EndSelect
EndIf
Until EventID = #PB_EventCloseWindow
EndIf
End
Anyone got a clue please?