Punkie Posted November 22, 2006 Share Posted November 22, 2006 I tried creating a slider with values between 1 and 8, but I cannot get it to display tickmarks every 1 unit or make its background transparent (I use it in a tab). $Slider_1 = GUICtrlCreateSlider(20, 100, 120, 30) GUICtrlSetLimit($Slider_1, 8, 1) GUICtrlSetData($Slider_1, 8) GUICtrlSetData($Label_NumberSlider, GUICtrlRead($Slider_1)) GUICtrlSetOnEvent($Slider_1,"NumberSlider") Func NumberSlider() ; Increasing/decreasing the value of the slider. GUICtrlSetData($Label_NumberSlider, GUICtrlRead($Slider_1)) EndFunc Link to comment Share on other sites More sharing options...
GaryFrost Posted November 22, 2006 Share Posted November 22, 2006 #include <GUIConstants.au3> #include <GuiSlider.au3> #include <GuiStatusBar.au3> $MainGUI = GUICreate("example", 300, 200) Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") GUISetState() $Slider_1 = GUICtrlCreateSlider(20, 100, 120, 30) GUICtrlSetLimit($Slider_1, 8, 1) GUICtrlSetData($Slider_1, 8) ;~ GUICtrlSetData($Label_NumberSlider, GUICtrlRead($Slider_1)) GUICtrlSetOnEvent($Slider_1,"NumberSlider") $h_slider = ControlGetHandle($MainGUI, "", "msctls_trackbar321") _GUICtrlSliderSetTicFreq($h_slider, 1) While 1 Sleep(10) Wend Func NumberSlider() ; Increasing/decreasing the value of the slider. ;~ GUICtrlSetData($Label_NumberSlider, GUICtrlRead($Slider_1)) ToolTip(GUICtrlRead($Slider_1)) EndFunc Func Close() Exit EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Punkie Posted November 22, 2006 Author Share Posted November 22, 2006 Thank you so much!! I should read all those files in the Include section, if I want to get somewhere Link to comment Share on other sites More sharing options...
Punkie Posted November 22, 2006 Author Share Posted November 22, 2006 (edited) P.S. How do I make the tooltip last only a few seconds? None of the Include files helped answer that question (nor the Help file). Edit: Argh, scratch that, I found out: If the x and y coordinates are omitted the, tip is placed near the mouse cursor. A Tooltip will appear until the script terminates or ToolTip("") is called. Edited November 22, 2006 by Punkie Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now