Restored from previous forum. Originally posted by Danilo.
Code: Select all
;---[ Fake look, works ]---hWnd = OpenWindow(1,100,100,400,400,#PB_Window_SystemMenu,"FramePanel")
CreateGadgetList(hWnd)
Panel = PanelGadget(1, 6,24,388,300)
Button = ButtonGadget(2,325,350,50,22,"Quit")
For a = 1 To 6
AddGadgetItem(1,-1,"File "+Str(a))
TextGadget(2+a,10,10,200,25,"Hello World! on Panel "+StrU(a,2))
Next a
ClosePanelGadget()
SetGadgetState(1,0)
Frame = Frame3DGadget(9,2,2,396,396,"",1)
Repeat
Select WaitWindowEvent()
Case #PB_EventCloseWindow: End
Case #PB_EventGadget: If EventGadgetID() = 2: End: EndIf
EndSelect
ForEver
;--------------------------
Normally you use SetParent_() or you create a new
Gadgetlist. But this doesnt work with the Frame3DGadget.
Why is this fake look not OK ??
Things that dont work (dont get updated):
Code: Select all
;---[ new Gadget list ]---
hWnd = OpenWindow(1,100,100,400,400,#PB_Window_SystemMenu,"FramePanel")
CreateGadgetList(hWnd)
Frame = Frame3DGadget(9,2,2,396,396,"",1)
CreateGadgetList(Frame)
Panel = PanelGadget(1, 2,24,388,300)
Button = ButtonGadget(2,325,350,50,22,"Quit")
For a = 1 To 6
AddGadgetItem(1,-1,"File "+Str(a))
TextGadget(2+a,10,10,200,25,"Hello World! on Panel "+StrU(a,2))
Next a
ClosePanelGadget()
SetGadgetState(1,0)
Repeat
Select WaitWindowEvent()
Case #PB_EventCloseWindow: End
Case #PB_EventGadget: If EventGadgetID() = 2: End: EndIf
EndSelect
ForEver
;-------------------------
and
Code: Select all
;---[ SetParent ]---
hWnd = OpenWindow(1,100,100,400,400,#PB_Window_SystemMenu,"FramePanel")
CreateGadgetList(hWnd)
Frame = Frame3DGadget(0,2,2,396,396,"",1)
Panel = PanelGadget(1, 2,24,388,300)
Button = ButtonGadget(2,325,350,50,22,"Quit")
For a = 1 To 6
AddGadgetItem(1,-1,"File "+Str(a))
TextGadget(2+a,10,10,200,25,"Hello World! on Panel "+StrU(a,2))
Next a
ClosePanelGadget()
SetGadgetState(1,0)
SetParent_(Panel, Frame) ; Move Panel INTO Frame
SetParent_(Button, Frame) ; Move Button INTO Frame
Repeat
Select WaitWindowEvent()
Case #PB_EventCloseWindow: End
Case #PB_EventGadget: If EventGadgetID() = 2: End: EndIf
EndSelect
ForEver
;-------------------
The first code (fake look) works, so why not use it ??
cya,
...Danilo
(registered PureBasic user)