treeview

JavaFX TreeTableView - Prevent selection of certain TreeItems

不问归期 提交于 2020-01-26 04:06:06
问题 I have looked at a couple of questions here, but I can't seem to find anything related to disabling selection of rows for TreeTableViews in particular in JavaFX. The closest related questions I have come across are all related to TreeViews: How to make certain JavaFX TreeView nodes non-selectable? TreeView - Certain TreeItems are not allowed to be selected The answer given in question 2 where a custom selection-model is used that extends from MultipleSelectionModel seems to be the most

用TreeView实现树状结构

血红的双手。 提交于 2020-01-25 23:46:38
1.数据库:在SqlServer数据库中新建一个表DP_Data, 在表中添加如下3个字段:ID(节点ID),SuperID(父节点ID),Name(节点名) 并添加数据: ID Name SuperID 10 资料管理 0 20 入库管理 0 30 出库管理 0 101 产品管理 10 102 客户管理 10 103 仓库管理 10 201 入库单登记 20 202 入库单列表 20 203 入库汇总表 20 301 出货单登记 30 302 出货单列表 30 303 出货汇总表 30 1011 退货单登记 101 1012 退货单列表 101 2011 退货汇总表 201 2012 销售单登记 201 3011 销售单列表 301 3012 销售汇总表 301 3013 收款单登记 301 2.添加一个treeview: <asp:TreeView ID="tr_data" runat="server"></asp:TreeView> 3.递归函数构建树形结构: public void BindTree(TreeNodeCollection Tc,int SuperID) { SqlConnection conn = new SqlConnection(); conn.ConnectionString = "Server=.;Database=dapan_JXC;UID=sa

Bind C# Windows Form TreeView from DataBase

南楼画角 提交于 2020-01-25 10:10:35
问题 My DataBase Table Structure is like this : ID(Primary Key ) , Title (Nvarchar) , ParentID (this is the ID of current table) and the 'ParentID' of first node (root) is valued = -1 i loaded this data in Memory.(for example in a list of class) how can i add the items with a loop or something else to TreeView ? 回答1: Just order your data by ParentID, first results will be root one (-1). Then use if (ParentID == -1) { treeView1.Nodes.Add(ID, Title); } else { TreeNode tn = treeView1.Nodes.Find(ID,

Bind C# Windows Form TreeView from DataBase

我怕爱的太早我们不能终老 提交于 2020-01-25 10:05:30
问题 My DataBase Table Structure is like this : ID(Primary Key ) , Title (Nvarchar) , ParentID (this is the ID of current table) and the 'ParentID' of first node (root) is valued = -1 i loaded this data in Memory.(for example in a list of class) how can i add the items with a loop or something else to TreeView ? 回答1: Just order your data by ParentID, first results will be root one (-1). Then use if (ParentID == -1) { treeView1.Nodes.Add(ID, Title); } else { TreeNode tn = treeView1.Nodes.Find(ID,

tkinter change style questions

你说的曾经没有我的故事 提交于 2020-01-25 09:43:06
问题 Right now I have this code: tree = ttk.Treeview(root) style = ttk.Style() style.configure("Treeview", foreground='#00337f',background="#ffc61e") style.configure("Treeview.Heading", background="purple",foreground='#00337f',font=(20)) tree["columns"] = ("one", "two", "three") tree.column("one", width=150) tree.column("two", width=150) tree.column("three", width=210) tree.heading("one", text="Naar") tree.heading("two", text="Spoor") tree.heading("three", text="Vetrektijd") tree.tag_configure(

How to create a button or option which allows a user to filter a treeview based on a value in a column (python)?

不打扰是莪最后的温柔 提交于 2020-01-25 06:47:08
问题 I have created a GUI where volume data is being displayed based on a currency selection from a drop down menu. The displayed dataframe looks like the example below. The dataframe is displayed using a Treeview. I would like to create the option for the user to filter it down. To load the main frame the dropdown contains the main currency EUR in this example so when it is selected the volume for all the currency pairs against EUR is displayed. I would like to give the user the option to select

YUI Treeview (override labelClick)

£可爱£侵袭症+ 提交于 2020-01-25 05:05:22
问题 I am using dynamical loading in treeview, however I want it to load children nodes when click the plus icon instead of clicking label, I tried to override lableClick event and preventDefault event, but it didn't work, yui still load the children node when I clicked label tree.subscribe("labelClick", function(e) { YAHOO.util.Event.preventDefault(e); }); Any ideas to solve this problem? Thanks in advance. 回答1: The first parameter passed to your function is not the event, it's the node that was

Bind Textblock text to 2 different properties

我怕爱的太早我们不能终老 提交于 2020-01-24 20:57:57
问题 I have a binded treeview that displays one of the properties (namely, the displayname) of the treeviewitem (which are custom viewmodel's of an object). Here is the associated xaml: <local:ExtendedTreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding SubOrganLocations}"> <TextBlock Text="{Binding OrganDisplayName}" > </TextBlock> </HierarchicalDataTemplate> </local:ExtendedTreeView.ItemTemplate> What I want is to be able to display another property next to the display name in

In WPF,MVVM should ViewModel be involved in opening a window, e.g. About-window?

送分小仙女□ 提交于 2020-01-24 17:08:06
问题 I have a standard WPF treeview and have bound items to view model classes. I now wish to handle behaviour when items are double-clicked (opening documents visual-studio-style). I can get event-handler to fire in the control housing the treeview (xaml shown), but how do I bind to specific behaviour on the view model classes - e.g. ProjectViewModel? Preferable bound to ICommand-implementer, as this is used elsewhere... Thanks for any comments, Anders, Denmark <TreeView ItemsSource="{Binding

In WPF,MVVM should ViewModel be involved in opening a window, e.g. About-window?

南笙酒味 提交于 2020-01-24 17:08:05
问题 I have a standard WPF treeview and have bound items to view model classes. I now wish to handle behaviour when items are double-clicked (opening documents visual-studio-style). I can get event-handler to fire in the control housing the treeview (xaml shown), but how do I bind to specific behaviour on the view model classes - e.g. ProjectViewModel? Preferable bound to ICommand-implementer, as this is used elsewhere... Thanks for any comments, Anders, Denmark <TreeView ItemsSource="{Binding