Hi,
I want to create a ProgBar that's clickable.
And by clickable I mean that you can click anywhere on the
ProgBar and you'll get the Mouse X and Y coordinates.
I'm going to use it as a Slider, because the slider is so damn ugly.
This is the code I've come up with, as long as I don't hide the panel it works, but then I can't see the Progbar :P
And if I draw the Panel under the Progbar, the mouseevents won't show up.
Any solutions to this?
Thanks :)
I want to create a ProgBar that's clickable.
And by clickable I mean that you can click anywhere on the
ProgBar and you'll get the Mouse X and Y coordinates.
I'm going to use it as a Slider, because the slider is so damn ugly.
Strict Local WW:Int = 200 Local WH:Int = 30 Local WX:Int = GadgetWidth(Desktop())/2-WW/2 Local WY:Int = GadgetHeight(Desktop())/2-WH/2 Global MainWindow:TGadget = CreateWindow( "Testing.", WX, WY, WW, WH, Null, WINDOW_TITLEBAR | WINDOW_CLIENTCOORDS ) Global MainWindowPanel:TGadget = CreatePanel( 5 , 5 , WW - 10 , 20 , MainWindow , PANEL_ACTIVE ) 'HideGadget( MainWindowPanel ) Global MainWindowProgbar:TGadget = CreateProgBar( 5, 5, WW-10, 20, MainWindow ) 'Global MainWindowPanel:TGadget = CreatePanel( 5 , 5 , WW - 10 , 20 , MainWindow , PANEL_ACTIVE ) Repeat If PeekEvent() <> Null WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_MOUSEDOWN Print "MOUSEDOWN Event." End Select EndIf Delay 2 Forever
This is the code I've come up with, as long as I don't hide the panel it works, but then I can't see the Progbar :P
And if I draw the Panel under the Progbar, the mouseevents won't show up.
Any solutions to this?
Thanks :)