Jump to content

Recommended Posts

Posted (edited)

Hi guys
I have a question about the slider  controle
There is a problem with screen readers, wen we Using a screen reader We usually move between GUI controls using the tab key.
But when you create a slider , beside to it there are  buttons and check boxes or any other controls, When I move between the GUI controls using the tab key I can not find the slider.
But if it were alone in the window, I would find it normally.
Is there a solution to Solve this problem please?
This is the code i tried

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <SliderConstants.au3>
main()

Func main()
    GUICreate("slider", 200, 200, -1, -1)
GUICtrlCreateGroup("slider", 10, 10, 240, 50)
    Local $idSlider1 = GUICtrlCreateSlider(50, 30, 200, 20, BitOr($TBS_DOWNISLEFT, $TBS_BOTH))
    GUICtrlSetLimit(-1, 100, 0)

;GUIStartGroup("")
    Local $idButton = GUICtrlCreatebutton("Value?", 75, 70, 70, 20)
    GUISetState(@SW_SHOW)
    GUICtrlSetData($idSlider1, 10)
while 1
switch GUIGetMsg()
case $GUI_EVENT_CLOSE
exit

case $idButton
            MsgBox($MB_SYSTEMMODAL, "slider1", GUICtrlRead($idSlider1))
endSwitch
Wend
EndFunc

[Click and drag to move]

 

 

Edited by nacerbaaziz
Posted (edited)

@nacerbaaziz

By default, the slider does not have a tab stop.  If you want it to have a tab stop then look at the code below.  Note that $WS_TABSTOP was added to the definition of the slider control.

#include <Constants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
Global $Form2 = GUICreate("Form2", 216, 121, 335, 192)
Global $Slider1 = GUICtrlCreateSlider(8, 16, 150, 45, BitOR($GUI_SS_DEFAULT_SLIDER,$WS_TABSTOP))
Global $Button1 = GUICtrlCreateButton("Button1", 16, 72, 75, 25)
#EndRegion ### END Koda GUI section ###

GUISetState(@SW_SHOW)
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $Slider1
            MsgBox($MB_SYSTEMMODAL, "slider1", GUICtrlRead($Slider1))
    EndSwitch
WEnd

 

Also, when showing code, could you please use the code tags?  It makes it much easier to read and it creates links to the help file for commands that are recognized.

 

image.png.1ecb1b0766ab60430a97b11b615b3a6e.png

 

Edited by TheXman
Added a little more clarity.
Posted

it's succeeded, my dear. Thank you very much for your quick response

and about  the code field
There is some difficulty for me as a screen readers user

the code field is conflicts with the screen reader
I hope the administration will address this problem

Posted
8 minutes ago, nacerbaaziz said:

There is some difficulty for me as a screen readers user

@nacerbaaziz

I understand now.  I thought that you were creating tools for people who use screen readers.  I didn't realize that you use a screen reader also.

Posted (edited)
51 minutes ago, nacerbaaziz said:

Are there any specific tags I can use in the editor to place the code?

@nacerbaaziz

Although you won't get the color-coding and links, you can wrap your code in the following tags to get it to format it in a code box:

You can place [code] at the beginning and [/code] at the end of the code snippet.

So it will look something like this: (hint: Press Shift+Enter for new line within code, if you are manually typing it)

[code]
local $a
$a += 1
[/code]

 

Then it will look like this:

local $a
$a += 1

 

Edited by TheXman

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
×
×
  • Create New...