wiredbits Posted February 17, 2006 Posted February 17, 2006 Hi Does anyone know how to force style of a vertical slider to TBS_DOWNISLEFT? Simple but it is driving me crazy Thanks Jim
GaryFrost Posted February 18, 2006 Posted February 18, 2006 (edited) Hi Does anyone know how to force style of a vertical slider to TBS_DOWNISLEFT? Simple but it is driving me crazy Thanks Jim #include <GUIConstants.au3> Const $TBS_DOWNISLEFT = 0x0400 GUICreate("slider",220,300, 100,200) GUISetBkColor (0x00E0FFFF) ; will change background color $slider1 = GUICtrlCreateSlider (10,10,20,200, BitOR($TBS_VERT, $WS_EX_CLIENTEDGE,$TBS_DOWNISLEFT)) GUICtrlSetLimit(-1,200,0) ; change min/max value $button = GUICtrlCreateButton ("Value?",75,70,70,20) GUISetState() GUICtrlSetData($slider1,45); set cursor $start=TimerInit() Do $n = GUIGetMsg () If $n = $button Then MsgBox(0,"slider1",GUICtrlRead($slider1),2) $start=TimerInit() EndIf Until $n = $GUI_EVENT_CLOSE Edited February 18, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
wiredbits Posted February 18, 2006 Author Posted February 18, 2006 #include <GUIConstants.au3> Const $TBS_DOWNISLEFT = 0x0400 GUICreate("slider",220,300, 100,200) GUISetBkColor (0x00E0FFFF); will change background color $slider1 = GUICtrlCreateSlider (10,10,20,200, BitOR($TBS_VERT, $WS_EX_CLIENTEDGE,$TBS_DOWNISLEFT)) GUICtrlSetLimit(-1,200,0) ; change min/max value $button = GUICtrlCreateButton ("Value?",75,70,70,20) GUISetState() GUICtrlSetData($slider1,45); set cursor $start=TimerInit() Do $n = GUIGetMsg () If $n = $button Then MsgBox(0,"slider1",GUICtrlRead($slider1),2) $start=TimerInit() EndIf Until $n = $GUI_EVENT_CLOSEHI Thanks but I have already tried the above, unless I am missing somthing when TBS_DOWNISLEFT is set moving the slider down decreases value instead of the default which is increase. Again thanks
GaryFrost Posted February 18, 2006 Posted February 18, 2006 sorry, didn't notice but it only works on horizontal slider expandcollapse popup#include <GUIConstants.au3> Const $TBS_DOWNISLEFT = 0x0400 GUICreate("slider",220,300, 100,200) GUISetBkColor (0x00E0FFFF); will change background color $slider1 = GUICtrlCreateSlider (10,10,200,20, BitOR($WS_EX_CLIENTEDGE,$TBS_DOWNISLEFT)) GUICtrlSetLimit(-1,200,0) ; change min/max value $button = GUICtrlCreateButton ("Value?",75,70,70,20) GUISetState() GUICtrlSetData($slider1,45); set cursor $start=TimerInit() Do $n = GUIGetMsg () If $n = $button Then MsgBox(0,"slider1",GUICtrlRead($slider1),2) $start=TimerInit() EndIf Until $n = $GUI_EVENT_CLOSE GUIDelete() GUICreate("slider",220,300, 100,200) GUISetBkColor (0x00E0FFFF); will change background color $slider1 = GUICtrlCreateSlider (10,10,200,20, $WS_EX_CLIENTEDGE) GUICtrlSetLimit(-1,200,0) ; change min/max value $button = GUICtrlCreateButton ("Value?",75,70,70,20) GUISetState() GUICtrlSetData($slider1,45); set cursor $start=TimerInit() Do $n = GUIGetMsg () If $n = $button Then MsgBox(0,"slider1",GUICtrlRead($slider1),2) $start=TimerInit() EndIf Until $n = $GUI_EVENT_CLOSE SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
wiredbits Posted February 18, 2006 Author Posted February 18, 2006 yes, easy to code for reverse values but for completeness I just wanted to set styles. This drove me batty since I could not find any value to use with sendmessage that would change styles for a slider. Oh well I will work with what i have. Thanks
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