Sign in to follow this  
Followers 0
Qual-IT London

slider

4 posts in this topic

does anyone know if its possible to do the attached?

have a slider with, in my case 3 positions

if position 1 then

if position 2 then

if position 3 then

default position =

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Like this?

GUICreate("slider",220,100, 100,200)
GUISetBkColor (0x00E0FFFF); will change background color

$slider1 = GUICtrlCreateSlider (10,10,200,20)
GUICtrlSetLimit(-1,3,1) ; change min/max value
$button = GUICtrlCreateButton ("DO SOMETHING", 75,70,70,20)
GUISetState()
GUICtrlSetData($slider1,2); set cursor to middle

Do
  $n = GUIGetMsg ()
     
   If $n = $button Then
      $value = GUICtrlRead($slider1)
      If $value == 1 Then
           MSGBOX(0,"","STH FANTASTIC LEFT")
      Endif
      If $value == 2 Then
           MSGBOX(0,"","STH FANTASTIC MIDDLE")
      Endif
      If $value == 3 Then
           MSGBOX(0,"","STH FANTASTIC RIGHT")
      Endif
   EndIf
Until $n = $GUI_EVENT_CLOSE

#)

EDIT: (NOT TESTED)

Edited by nfwu

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Does this work for you? GUICtrlCreateSlider()

Edit: Or - Since nwfu gave an entire example :o ... and beat me to the punch... does 'that' work for you?

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Does this work for you? GUICtrlCreateSlider()

Edit: Or - Since nwfu gave an entire example :o ... and beat me to the punch... does 'that' work for you?

Thank you and sorry; i should have found that myself.

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