jonny1234 Posted November 15, 2006 Share Posted November 15, 2006 Hi, For a ListView control, it appears as though there is a LVN_KEYDOWN notification for KeyDown, but nothing for KeyUp (such as LVN_KEYUP). Please can you tell me if there is any way to catch a KeyUp event for a ListView control. I would like to determine when the user has finished keyboard navigation of the ListView, then run some code a specified amount of time later. So I would like to start a timer on the KeyUp event, then execute some code after the timer interval has elapsed, or else reset the timer if the user starts navigating the ListView again before the interval has elapsed. I don't want to run any of my own code while the user is navigating the ListView, only once they have stopped (say 200ms after they have stopped), in order to keep things running smoothly while they are navigating. Any suggestions would be most welcome. Regards, Jonny Link to comment Share on other sites More sharing options...
martin Posted November 18, 2006 Share Posted November 18, 2006 Maybe you could use $GUI_EVENT_PRIMARYUP to find when the mouse button is released, and then check if the mouse was over the listview. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 18, 2006 Share Posted November 18, 2006 example of double clicking the a listview and having it do somethinghttp://www.autoitscript.com/forum/index.ph...=5279&st=15 Link to comment Share on other sites More sharing options...
jonny1234 Posted November 18, 2006 Author Share Posted November 18, 2006 Thanks for your replies, but the application needs to be controlled by using the keyboard only, which is why I am asking about a KeyUp event and not a MouseUp event. Regards, Jonny Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 18, 2006 Share Posted November 18, 2006 its an example of how to use GUIRegisterMsg which if you look at it in the helpfile shows its possibilities Link to comment Share on other sites More sharing options...
GaryFrost Posted November 18, 2006 Share Posted November 18, 2006 its an example of how to use GUIRegisterMsg which if you look at it in the helpfile shows its possibilitiesHere's the list of Notifications for future referencehttp://msdn.microsoft.com/library/shared/d...hellcc1039_.xml SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
jonny1234 Posted November 18, 2006 Author Share Posted November 18, 2006 Thanks for the notifications list. It reinforces my belief that while you can do just about anything with the ListView control, it's not possible to catch a KeyUp event in it. Regards, Jonny P.S. Thanks for GuiListView.au3, gafrost. I am finding it very useful. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 could of swore i saw a LVN_KEYUP, why is the Keyup so important maybe there could be a work around if you havent already found one Link to comment Share on other sites More sharing options...
jonny1234 Posted November 19, 2006 Author Share Posted November 19, 2006 could of swore i saw a LVN_KEYUP, why is the Keyup so important maybe there could be a work around if you havent already found oneAs an example of why I would like to detect a KeyUp event, suppose the user presses the down arrow key on the ListView. This causes the next item in the list to be selected. Any time a new ListView item is selected, it appears that (at least) 4 events fire:LVN_ITEMCHANGING, LVN_ITEMCHANGED (for the the previous item that was selected)LVN_ITEMCHANGING, LVN_ITEMCHANGED (for the the new item that is selected)In the LVN_ITEMCHANGED event, I have some code to display some text in an edit control, relating to the current ListView selection. If the user holds down the down arrow key to scroll down the ListView, lots of events build up everything slows right down.So, rather than have the display code in the LVN_ITEMCHANGED event, I would like to have it in a KeyUp event, so that text is displayed in the edit control only when the user has stopped scrolling through the ListView.It would be great if there was a workaround, and I would appreciate any suggestions.Regards,Jonny Link to comment Share on other sites More sharing options...
kklee69 Posted March 24, 2018 Share Posted March 24, 2018 Will you solve the problem? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 24, 2018 Moderators Share Posted March 24, 2018 kklee69, You do realise that the post above yours dates from close to 12 years ago - and that the poster has nor been on the forum for over 4 years? What makes you think that he will reply? Please do not necro-post like this again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bilgus Posted March 24, 2018 Share Posted March 24, 2018 (edited) Last post from 2006!!? You should have created a new topic Edited March 26, 2018 by Bilgus Link to comment Share on other sites More sharing options...
kklee69 Posted March 25, 2018 Share Posted March 25, 2018 8 hours ago, Melba23 said: kklee69, You do realise that the post above yours dates from close to 12 years ago - and that the poster has nor been on the forum for over 4 years? What makes you think that he will reply? Please do not necro-post like this again. M23 SORRY !! Next time I will pay attention Link to comment Share on other sites More sharing options...
Bilgus Posted March 26, 2018 Share Posted March 26, 2018 @Kklee69 Here is one way to do what you want Link to comment Share on other sites More sharing options...
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