Highlighted
Outstanding Contributor.
Outstanding Contributor.
873 views

Select a treeview

Jump to solution

Hello,

I made my first program with a TreeView and is working.
I used the method that is in the example WPFBOOK the demo.

Now the question I am asking is how do I get the selected line?
For example I have a locale with five clients. What I want is to click on a client and display your data in another window.

Thank you

Alberto Ferraz

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Select a treeview

Jump to solution

How you return the value selected depends on whether or not you are using binding but a real simple example is using the SelectedItemChanged event.

method-id treeView1_SelectedItemChanged.
procedure division using by value sender as object e as type System.Windows.RoutedPropertyChangedEventArgs[type System.Object].

          declare myselection = treeView1::SelectedItem

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Select a treeview

Jump to solution

How you return the value selected depends on whether or not you are using binding but a real simple example is using the SelectedItemChanged event.

method-id treeView1_SelectedItemChanged.
procedure division using by value sender as object e as type System.Windows.RoutedPropertyChangedEventArgs[type System.Object].

          declare myselection = treeView1::SelectedItem

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Select a treeview

Jump to solution

Thanks again for your help.

Best regards

Alberto Ferraz

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.