|
NodeLink node control
Wednesday, 09 September 2009
NodeLink allows you to display a hyperlink. To make link clicks respond, subscribe to the LinkClicked treeview event. Example: // create the node control. NodeLink nc = new NodeLink(); nc.AttachTo(tree); // add a node with the Link property. NodeWithLink n = new NodeWithLink("Show features", "www.FlexibleTreeView.com/features.html"); n.AttachTo(tree); tree.LinkClicked+=tree_LinkClicked; // respond to link clicks. void tree_LinkClicked(FlexibleTreeView pTreeview, LinkEventArgs pArgs) { MessageBox.Show("Clicked link: " + pArgs.Link); } You can easily override the hyperlink appearance using these treeview properties:
The LinkStyle and LinkHotStyle property values can be combined using any item from the eTextStyle enum. // in the global theme for all treeviews. tree.Theme = eVisualTheme.Global; ThemeManager.ActiveManager.Colors[eColor.LinkForeColor] = Color.Silver; ThemeManager.ActiveManager.Colors[eColor.LinkForeColorHot] = Color.Black; // or in the separate treeview`s personal theme. tree. Colors[eColor.LinkForeColor] = Color.Silver;
|
|