-
- 2399487337
- Posts: 2
- Joined:
TreeView problem
Can you provide examples of treeview use in UE4.27? The treeview cannot be folded or expanded in UE4.27 with NoesisGUI v3.1.7.
Code: Select all
<UserControl.Resources>
<HierarchicalDataTemplate x:Key="MyTreeItemTemplate"
ItemsSource="{Binding Path=Children}">
<StackPanel Orientation="Horizontal" >
<CheckBox IsChecked="{Binding Path=IsChecked}" >
</CheckBox>
<ContentPresenter Content="{Binding Path=NodeName}" Margin="2,0"/>
</StackPanel>
</HierarchicalDataTemplate>
</UserControl.Resources>
<Grid>
<TreeView ItemsSource="{Binding CommonTreeViews}"
ItemTemplate="{StaticResource MyTreeItemTemplate}"
>
</TreeView>
</Grid>
-
-
sfernandez
Site Admin
- Posts: 2783
- Joined:
Re: TreeView problem
Hi, I have created an example in Unreal 4.27 with the same xaml you posted, then created a Blueprint class to represent the node items with the following properties:
- NodeName (string)
- IsChecked (boolean)
- Children (NodeItem array)
And finally added to the View asset a property CommonTreeViews (NodeItem array) and filled it with some node items data.
When playing the TreeView shows the expected items and I can properly expand the parent items by clicking in the item arrow.
Please find attached the assets I used and let me know if you find any problem with those.
- NodeName (string)
- IsChecked (boolean)
- Children (NodeItem array)
And finally added to the View asset a property CommonTreeViews (NodeItem array) and filled it with some node items data.
When playing the TreeView shows the expected items and I can properly expand the parent items by clicking in the item arrow.
Please find attached the assets I used and let me know if you find any problem with those.
- Attachments
-
- TestTreeView.zip
- (29.71 KiB) Downloaded 3 times
Who is online
Users browsing this forum: No registered users and 3 guests