Jewtus

If gui object is selected

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



@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:

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

All thanks go to Melba, but glad you got it working :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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