TrackBarGadget

Just starting out? Need help? Post your questions and find answers here.
Stephen
User
User
Posts: 21
Joined: Sat Oct 18, 2003 10:36 pm

TrackBarGadget

Post by Stephen »

Im a little lost with Trackbargadget,
i understand it and can alter it.
But i just cant get the results to change the volume,
Please help
CS2001
User
User
Posts: 14
Joined: Mon Jun 09, 2003 6:17 pm
Location: Germany
Contact:

Post by CS2001 »

You can get the Result with getgadgetstate(gadgetid):

Code: Select all

; PureBasic Visual Designer v3.80 build 1249


;- Window Constants
;
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
;
Enumeration
  #Gadget_0
EndEnumeration


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())
      TrackBarGadget(#Gadget_0, 0, 80, 600, 30, 0, 100, #PB_TrackBar_Ticks)
      
    EndIf
  EndIf
EndProcedure
Open_Window_0()

Repeat
  
  Event = WaitWindowEvent()
  
  If Event = #PB_EventGadget
    GadgetID = EventGadgetID()
    If GadgetID = #Gadget_0
      Debug GetGadgetState(#Gadget_0)
    EndIf
  EndIf
  
Until Event = #PB_EventCloseWindow

End
CS2001
Post Reply