Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

How do I implement the backward and forward (the 2 arrows buttons) in a window's form?

Are there contols or sample code avaiable to implement this?  I'm coding a form with treeview on left and listview on right of a container control.  It's like the Active Directory's computer, user and groups console.  The backward and forward button would change the display of the Treeview and the Listview to previous or forwarded user's selected node.

Thanks.
Avatar of jjardine
jjardine
Flag of United States of America image

I have not created this functionality but here is an idea of how you could do it.  

Create an array or arraylist that holds the list of tree nodes that the user clicks on.
Store the index that the user is currently on.

As the user selects the nodes,   Add them to the array and increment the index.  

When the user clicks the back button then subtract 1 from the index and select that node.  

When the user clicks the forward button then add 1 to the index and select that node.  

Hope that helps with an idea for how to solve this.
ASKER CERTIFIED SOLUTION
Avatar of martin75a
martin75a

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial