Jewtus Posted June 28, 2016 Share Posted June 28, 2016 I have a gui with 2 list views. I want to send the search command based on which list view is selected: If _IsPressed(11) AND _IsPressed(46) AND WinActive($guiViewProjects) Then ProjectSearch($idlvNotMarked,$MarkupGUI) If _IsPressed(11) AND _IsPressed(46) AND WinActive($guiViewProjects) Then ProjectSearch($idlvMarked,$MarkupGUI) I know that I need to add another parameter to each of these if statements but I'm not sure how to figure out if an element in the gui is the selected element. Tips? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 28, 2016 Moderators Share Posted June 28, 2016 @Jewtus I recall running into something similar a while back in the post below. Melba suggested setting the listview handle to a global variable when an item in it was selected. Worked for me: "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Jewtus Posted June 28, 2016 Author Share Posted June 28, 2016 Perfect! That is exactly what I was hoping for... I already have a vm_notify for the sorter so this is a simple 1 line add. Thanks! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 28, 2016 Moderators Share Posted June 28, 2016 All thanks go to Melba, but glad you got it working "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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