By
nacerbaaziz
good morning all.
first lit me give you all a thinks to your help
you're help me allot thank you all.
sirs today i've a new problem
it's not a problem but thing i want to add it to blind accessability.
the ListBox can send a notification when the user send a double click on it items
but as we know that the blind users can't use the mouse for that they use the keybord to navigate.
as we know that the enter replace the double click on the keybord
for that i need when the user send a inter above any listBox item the list send a double click notification.
i know some of you tell me that i can use the GUISetAccelerators function
but the enter has a other tasks such as leav a blanc line on edits and activate the defaultButton and other tasks.
that what i need and i hope that you can help me
this is a simple example.
#include <GUIConstantsEx.au3>
#include <StructureConstants.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <ListBoxConstants.au3>
Example()
Func Example()
Local $sMESSAGE = "The following buttons have been clicked"
GUICreate("My GUI list") ; will create a dialog box that when displayed is centered
Local $idButton_Add = GUICtrlCreateButton("Add", 64, 32, 75, 25)
Local $idButton_Clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25)
global $idMylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97)
GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling
GUICtrlSetData(-1, $sMESSAGE)
global $DummyList = GUICtrlCreateDummy()
GUICtrlSendToDummy($DummyList, 1)
Local $idButton_Close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25)
GUIRegisterMsg($WM_command, "WM_command")
GUISetState(@SW_SHOW)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton_Add
GUICtrlSetData($idMylist, "You clicked button No1|")
Case $idButton_Clear
GUICtrlSetData($idMylist, "")
Case $idButton_Close
MsgBox($MB_SYSTEMMODAL, "", "the closing button has been clicked", 2)
Exit
case $DummyList
$g_iTemp = GUICtrlRead($DummyList)
if $g_iTemp = $LBN_DBLCLK then
;$LBN_DBLCLK then
msgBox(64, "", "")
endIf
GUICtrlSendToDummy($DummyList, 0)
EndSwitch
WEnd
EndFunc ;==>Example
Func WM_command($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg
Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$hWndFrom = $lParam
$iCode = BitShift($wParam, 16) ; Hi Word
Switch $hWndFrom
Case GUICtrlGetHandle($idMylist)
Switch $iCode
Case $LBN_SELCHANGE, $LBN_DBLCLK, $LBN_SELCANCEL, $LBN_SETFOCUS
GUICtrlSendToDummy($DummyList, $iCode)
case else
;GUICtrlSendToDummy($DummyTreeview, 1)
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc