Home Forums WinForms controls Other WinForms controls Double click to expand in treeview

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17927 |

    Can I double click to expand the in the smartTreeView?

    Thanks
    jack

    Imported from legacy forums. Posted by jackjiaus (had 2305 views)

    User (Old forums)
    Member
    Post count: 23064

    Of course you can. Subcribe the ItemDoubleClick event and us
    following code…

    C#

    private void FaTree_ItemDoubleClick(object sender, Xceed.SmartUI.SmartItemEventArgs e )
    {

    if (( ( Xceed.SmartUI.Controls.TreeView.Node )e.Item).Expanded == true)
    ( ( Xceed.SmartUI.Controls.TreeView.Node )e.Item).Expanded = false;
    else
    ( ( Xceed.SmartUI.Controls.TreeView.Node )e.Item).Expanded = true;
    }

    VB.NET

    Private Sub FaTree_ItemDoubleClick(ByVal sender As Object, ByVal e As Xceed.SmartUI.SmartItemEventArgs) Handles FaTree.ItemDoubleClick

    If CType(e.Item, Xceed.SmartUI.Controls.TreeView.Node).Expanded = True Then
    CType(e.Item, Xceed.SmartUI.Controls.TreeView.Node).Expanded = False
    Else
    CType(e.Item, Xceed.SmartUI.Controls.TreeView.Node).Expanded = True
    End If
    End Sub

    Imported from legacy forums. Posted by Fatih Cem (had 3198 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.