Sign in to follow this  
Followers 0
crest

Slider-Style

7 posts in this topic

Hi

I want this sliderbar to have ticks which display the number/value of that position:

_____________    <-- slider
| | | | | | |
1 2 3 4 5 6 7

something like that, yet i found nothing in the helpfile :lmao:

current code:

#include <GUIConstants.au3>
Global $amount
GUICreate ( "Conjure Water v1.2b", 300, 150)


$slider = GUICtrlCreateSlider (50,30,200,20,$TBS_AUTOTICKS)
GuiCtrlSetLimit ($slider, 20, 10)   
$button = GUICtrlCreateButton ( "OK",110,100,80,20) 
GuiSetState()
GuiCtrlSetData ($slider, 0)

While 1
    $tempvar = GUiGetMsg()
    
    If  $tempvar = $button Then 
        $amount = GuiCtrlRead ($slider)
        ExitLoop
    Endif
Wend

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi

I want this sliderbar to have ticks which display the number/value of that position:

_____________    <-- slider
| | | | | | |
1 2 3 4 5 6 7

something like that, yet i found nothing in the helpfile :ph34r:

current code:

#include <GUIConstants.au3>
Global $amount
GUICreate ( "Conjure Water v1.2b", 300, 150)
$slider = GUICtrlCreateSlider (50,30,200,20,$TBS_AUTOTICKS)
GuiCtrlSetLimit ($slider, 20, 10)   
$button = GUICtrlCreateButton ( "OK",110,100,80,20) 
GuiSetState()
GuiCtrlSetData ($slider, 0)

While 1
    $tempvar = GUiGetMsg()
    
    If  $tempvar = $button Then 
        $amount = GuiCtrlRead ($slider)
        ExitLoop
    Endif
Wend
oÝ÷ Ûú®¢×¢æ©¥æ«¶µ«brI®Gè­ëÞ¯-t¦Û(~¶§ä¢Ç­«wöËayéí·«jx¡ü¨º»%׫jYr¢è¶+-·
-É,#flº·¢~Ø^­è¬k²¶¶0©ò¦Û)z»brI®J+¦ÞØ^:ò¶¢YhÂ)ཪâjبȧʫ±Êâ¦Ö®¶­sdwV7G&Å6WDÆÖBb33c·6ÆFW"Â#¤wV7G&Å6WDÆÖBb33c·6ÆFW"Â#¤wV7G&Å6WDÆÖBb33c·6ÆFW"Â#¤wV7G&Å6WDÆÖBb33c·6ÆFW"Â#ÂfÇC³ÓÒW7V6ÆÇ6ÆÇâ÷rBF7Æ2F6²Ö&·

Maybe there are more Extended Style options, but I couldn't find them... :lmao:

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ive tried to chance this "1 tick per 10 pts of range" to 1 tick per 1pt, doesnt work tho, maybe ive done something wrong.

style [optional]Defines the style of the control. See GUI Control Styles Appendix.

$TBS_AUTOTICKS - 0x0001 - Adds tick marks when you set the range on the trackbar by using the TBM_SETRANGE message.

#include <GUIConstants.au3>
Global $amount
GUICreate ( "Conjure Water v1.2b", 300, 150)

$TBM_SETRANGE = 1     ; <----- should chance ticks to be displayed every pt of range according to the helpfile
$slider = GUICtrlCreateSlider (50,30,200,20,$TBS_AUTOTICKS)
GuiCtrlSetLimit ($slider, 20,10)
$button = GUICtrlCreateButton ( "OK",110,100,80,20) 
GuiSetState()
GuiCtrlSetData ($slider, 0)

While 1
    $tempvar = GUiGetMsg()
    
    If  $tempvar = $button Then 
        $amount = GuiCtrlRead ($slider)
        ExitLoop
    Endif
Wend
Edited by crest

Share this post


Link to post
Share on other sites

ive tried to chance this "1 tick per 10 pts of range" to 1 tick per 1pt, doesnt work tho, maybe ive done something wrong.

I saw that in the helpfile, but couldn't find any other reference to "TBM_SETRANGE message". :ph34r:

Maybe one the smart people will clue us dummies in on how that works.

:lmao:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

bump^^

maybe someone knows how to do this (or can at least say, that its impossible at the current state of autoit)

thanks :whistle:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I saw that in the helpfile, but couldn't find any other reference to "TBM_SETRANGE message". ;)

Maybe one the smart people will clue us dummies in on how that works.

:whistle:

Doing a dll call to sendmessage() using TBM_SETRANGE.

http://msdn.microsoft.com/library/default....sendmessage.asp

i think :P

and this might help you out with the values, and to do other stuff with a trackbar.

http://www.minigui.com/api_ref/2.0.x/group...kbar__msgs.html

Edited by CHRIS95219

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