Gadget in statusBar
Posted: Mon Feb 02, 2009 11:20 am
Hi Guys !
what about your morning, for me not so cool because i have one problem
i just want to put some gadget in Statusbar but seems difficult know. please i need a help
thanks
what about your morning, for me not so cool because i have one problem
i just want to put some gadget in Statusbar but seems difficult know. please i need a help
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#StatusBar_Window_0
EndEnumeration
Enumeration
#CheckBox_0
EndEnumeration
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 653, 201, 181, 105, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
CheckBoxGadget(#CheckBox_0, 35, 75, 130, 25, "put me in the statusBar")
If CreateStatusBar(#StatusBar_Window_0, WindowID(#Window_0))
SetParent_(#CheckBox_0,GadgetID(#StatusBar_Window_0))
UpdateWindow_(GadgetID(#StatusBar_Window_0))
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #CheckBox_0
EndIf
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver