hi ho =)
is there a way to find out which panel gadget is currently active (or alternatively getting an event when it gets activated)?
thx
muaB
which panel gadget is active?
Hi
if you mean Panelitem?
Regards
Henrik
if you mean Panelitem?
Code: Select all
; PureBasic Visual Designer v3.63c Beta
;- Window Constants
;
#Window_0 = 0
;- Gadget Constants
;
#Gadget_0 = 0
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 600, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 0 )")
If CreateGadgetList(WindowID())
;- Panel2000
PanelGadget(#Gadget_0, 15, 30, 555, 185)
AddGadgetItem(#Gadget_0, -1, "Tab 1")
AddGadgetItem(#Gadget_0, -1, "Tab 2")
AddGadgetItem(#Gadget_0, -1, "Tab 3")
AddGadgetItem(#Gadget_0, -1, "Tab 4")
AddGadgetItem(#Gadget_0, -1, "Tab 5")
AddGadgetItem(#Gadget_0, -1, "Tab 6")
ClosePanelGadget()
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat
Event = WaitWindowEvent()
If Event=#PB_EventGadget
AdNum =GetGadgetState(#Gadget_0)
Result$ = GetGadgetItemText(#Gadget_0, AdNum,0)
SetWindowText_(WindowID(),"Pannel now activ: "+ Result$)
EndIf
Until Event = #PB_EventCloseWindow
End
Henrik

