Beispiel Code weiter unten
Code: Alles auswählen
Anchor_Bind(Master, ID, Parent = -1, Left = 0, Top = 0, Right = 0, Bottom = 0, cxMin = 0, cyMin = 0, cxMax = 0, cyMax = 0)
; - Apply an Anchor to given Gadget or Window. Drop the Anchor for Left, Top, Right and/or Bottom. Use -1 for
; the Boundaries to use the initial Size and Position.
Funktionsfähig, wie auch andere , bereits auf allen Systemen. Die Beta der MCF Basis / Workspace sollte auch Versionen für diese beinhalten.
Code: Alles auswählen
Enumeration
#Window
#Editor
#Panel
#ButtonLeft
#ButtonRight
#Listview
#Combo
#TrackBar_0
#TrackBar_1
#TrackBar_2
#Container
EndEnumeration
If OpenWindow(#Window, 400, 166, 373, 191, "New window ( 0 )", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
WindowBounds(#Window, 373, 191, #PB_Ignore, #PB_Ignore)
Anchor(#Window)
If CreateGadgetList(WindowID(#Window))
EditorGadget(#Editor, 70, 5, 180, 140)
Anchor(#Editor, #Window, 0, 0, 1, 1, -1, -1)
ButtonGadget(#ButtonLeft, 10, 150, 100, 20, "Left")
Anchor(#ButtonLeft, #Window, 0, 0, 0, 1, -1, -1, -1, -1)
ButtonGadget(#ButtonRight, 145, 150, 100, 20, "Right")
Anchor(#ButtonRight, #Window, 0, 0, 1, 1, -1, -1, 0, -1)
;- Panel
PanelGadget(#Panel, 255, 5, 115, 180)
Anchor(#Panel, #Window, 1, 0, 0, 1, -1, -1, -1)
AddGadgetItem(#Panel, -1, "Tab 1")
ListViewGadget(#Listview, 3, 28, 105, 125)
Anchor(#Listview, #Window, 0, 0, 0, 1, -1, -1)
ComboBoxGadget(#Combo, 3, 3, 105, 20)
AddGadgetItem(#Panel, -1, "Tab 2")
TrackBarGadget(#TrackBar_0, 3, 8, 100, 20, 0, 10)
TrackBarGadget(#TrackBar_1, 3, 33, 100, 20, 0, 10)
TrackBarGadget(#TrackBar_2, 3, 58, 100, 20, 0, 10)
CloseGadgetList()
;-
ContainerGadget(#Container, 5, 5, 60, 140, #PB_Container_Raised)
Anchor(#Container, #Window, 0, 0, 0, 1, -1, -1)
CloseGadgetList()
EndIf
EndIf
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver