Valnurat Posted March 3, 2017 Posted March 3, 2017 I have this on a form. $idNewEntry = GUICtrlCreateButton("New", 310, 290, 85, 25) and for recieveing the content from a listview I do this by pressing the "New" button. Case $idNewEntry Local $iIndex = _GUICtrlListView_GetSelectedIndices($idListview) MsgBox($MB_SYSTEMMODAL, "listview item", $iIndex, 2) Local $aTest = _GUICtrlListView_GetItemTextArray($idListview, int(_GUICtrlListView_GetSelectedIndices($idListview))) _ArrayDisplay($aTest,"") _NewFormCreate() GUISetState(@SW_DISABLE,$hMainForm) But how can I use the ENTER button as alternative for selecting the content? Yours sincerely Kenneth.
InnI Posted March 3, 2017 Posted March 3, 2017 1 hour ago, Valnurat said: use the ENTER button as alternative $idNewEntry = GUICtrlCreateButton("New", 310, 290, 85, 25, $BS_DEFPUSHBUTTON) or $idNewEntry = GUICtrlCreateButton("New", 310, 290, 85, 25) Local $aAccelKeys[1][2] = [["{enter}", $idNewEntry]] GUISetAccelerators($aAccelKeys)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now