Sign in to follow this  
Followers 0
wiredbits

Vertical slider

5 posts in this topic

Hi

Does anyone know how to force style of a vertical slider to TBS_DOWNISLEFT? Simple but it is driving me crazy :o

Thanks

Jim

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi

Does anyone know how to force style of a vertical slider to TBS_DOWNISLEFT? Simple but it is driving me crazy :o

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 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.

 

Share this post


Link to post
Share on other sites

#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
HI

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

Share this post


Link to post
Share on other sites

sorry, didn't notice but it only works on horizontal slider

#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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0