treeview

UWP TreeView UI Deadlock - loading time from less than 1 sec to more than 10 sec - first run against new run

有些话、适合烂在心里 提交于 2020-04-30 07:14:52
问题 I have a major performance issue on a TreeView both in terms of loading time as well as a deadlock of the UI. private async Task LoadTreeAsync() { List<VPazVisit> aList = new List<VPazVisit>(); if (_sorting == "") { _sorting = await ApplicationData.Current.LocalSettings.ReadAsync<string>("TreeViewSort"); } treeView.Visibility = Visibility.Collapsed; Patients.Clear(); switch (_sorting) { default: case "DescDate": aList = await Task.Run(() => App.gDataContext.Cache.VPazVisit .OrderByDescending

Delphi公用函数单元

本小妞迷上赌 提交于 2020-04-29 10:01:21
{ ******************************************************* } { } { Delphi公用函数单元 } { } { 版权所有 (C) 2008 } { } { ******************************************************* } unit YzDelphiFunc; interface uses ComCtrls, Forms, Windows, Classes, SysUtils, ComObj, ActiveX, ShlObj, Messages, Graphics, Registry, Dialogs, Controls, uProcess, uCpuUsage, StrUtils, CommCtrl, jpeg, WinInet, ShellAPI, SHFolder, ADODB, WinSock; { 保存日志文件 } procedure YzWriteLogFile(Msg: String); { 延时函数,单位为毫秒 } procedure YzDelayTime(MSecs: Longint); { 判断字符串是否为数字 } function YzStrIsNum(Str: string ):boolean; { 判断文件是否正在使用 } function

uniGUI之主窗口折叠UI之UniTreeMenu(32-2)

Deadly 提交于 2020-04-15 15:34:18
【推荐阅读】微服务还能火多久?>>> 用uniGUI专有控件TUniTreeMenu 2.0给TUniTreeMenu菜单添加图标 2.1给TUniTreeMenu菜单添加事件 2.2修改背景色 2.3调整行高 2.4改变字体 和大小 2] 用uniGUI专有控件TUniTreeMenu,类似标准控件的TreeView,还可以为每个菜单增加图标 2.0给TUniTreeMenu菜单添加图标 其中左边的图标:Font Awesome [info]和[search],[home],[download],[trash],[refresh],[reply],[star],[user]有用,不是所有的都会显示出来。不推荐使用Font Awesome 推荐使用 Pictos,图标更全更多([locate]显示不出来) 2.1给TUniTreeMenu菜单添加事件 2.1.1添加一个UniMenuItems1 2.1.2将UniTreeMenu1的SourceMenu设为UniMenuItems1 然后像普通的MainMenu操作UniMenuItems1,添加事件,选择图标 存在的问题 目前发现菜单太多时右侧不能自动出现滚动条,即太多的子菜单将超出屏幕范围,鼠标滚轮不能翻动菜单项,不太方便。如何解决呢?在UniTreeMenu的clientEvents属性里的UniEvents里

Remove header row in tkinter treeview

我怕爱的太早我们不能终老 提交于 2020-04-14 19:25:29
问题 Can anyone tell me how to remove the header row in a tkinter Treeview? from tkinter import * from tkinter import ttk root = Tk() NewTree= ttk.Treeview(root) NewTree.pack() NewTree.heading("#0", text="How to remove this row?") NewTree.insert("", "0", 'item1',text='Item number 1') root.mainloop() 回答1: Use the show option to only show the tree and not the heading: NewTree = ttk.Treeview(root, show="tree") Relevant documentation From docs.python.org: show A list containing zero or more of the

How to filter a ttk.treeview in Python?

元气小坏坏 提交于 2020-04-11 04:22:12
问题 I have a python tkinter application that contains a ttk.treeview widget. The widget displays a list of files found on a specific directory tree with a specific extension - this was trivial to build with tt.treeview widget. There is a request to enable "on-the-fly" filtering of the tree - e.g., the user types in an Entry some string, and as he/she types, the tree removes elements that don't match the typed string so far. I was exploring the Treeview documentation, tried the detach and reattach

【版本升级】DevExtreme v16.1.7更新方法值类型

限于喜欢 提交于 2020-04-07 12:33:14
UI Widgets # BC3895: dxColorBox, dxAutocomplete widgets - 不必要的fieldEditEnabled选项已删除 fieldEditEnabled选项已经从dxColorBox和dxAutocomplete部件中删除了。此次重大的更改只适用于MVC Wrappers用户。想要使项目正常的工作,请从上面的部件配置列表中删除fieldEditEnabled选项。 # BC3902: MVC Wrappers - 更正TreeView.items.items方法值的类型。 在以前的版本中,TreeView.items.items方法错误地接受了字符串。现在,此方法正确地接受配置项集合的lambda表达式。 [C#] 1 2 3 4 5 6 7 8 9 10 @(Html.DevExtreme().TreeView() .Items(item1 => item1.Add() .Text( "item1" ) .Items(item11 => { item11.Add().Text( "item1_1" ); item11.Add().Text( "item1_2" ); item11.Add().Text( "item1_3" ); }) ) ) 此重大更改实际上只针对MVC Wrappers用户

C#winform TreeView编程

烂漫一生 提交于 2020-04-02 20:08:41
TreeView右键菜单从数据库中读取,插入,删除,查找(高亮显示并展开),编辑(即地编辑)的例子 这个项目包括二个文件,分别为From1.cs and FormCommon.cs,一个配置文件App.config Form1.cs using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace Tree { /// /// Form1 的摘要说明。 /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TreeView treeView1; private System.Data.SqlClient.SqlConnection sqlConnection1; /// /// 必需的设计器变量。 /// private System.ComponentModel.Container components = null ;

常用控件介绍 — TreeView和ListView(打造资源管理器)

放肆的年华 提交于 2020-04-02 20:08:00
1 ' 常用控件介绍 — TreeView和ListView 2 3 Imports System.IO 4 Public Class Form1 Class Form1 5 Inherits System.Windows.Forms.Form 6 7 Windows 窗体设计器生成的代码 #Region " Windows 窗体设计器生成的代码 " 8 9 Public Sub New() Sub New () 10 MyBase .New() 11 12 ' 该调用是 Windows 窗体设计器所必需的。 13 InitializeComponent() 14 15 ' 在 InitializeComponent() 调用之后添加任何初始化 16 17 End Sub 18 19 ' 窗体重写 dispose 以清理组件列表。 20 Protected Overloads Overrides Sub Dispose() Sub Dispose( ByVal disposing As Boolean ) 21 If disposing Then 22 If Not (components Is Nothing ) Then 23 components.Dispose() 24 End If 25 End If 26 MyBase .Dispose(disposing) 27

WPF中TreeView动态数据绑定

元气小坏坏 提交于 2020-03-29 18:31:39
1、在.xaml文件中添加TreeView控件 <TreeView Name="treeView"> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <TextBlock Text="{Binding Name}"/> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView> 注释:这里用到TreeView的ItemTemplate属性,通过对HierarchicalDataTemplate进行赋值,实现数据的动态绑定。HierarchicalDataTemplate:是以等级划分的数据模板的意思。 在上面的xaml文件中的Children、Name,在HierarchicalDataTemplate进行树的搭建之前,需要先在cs文件中,定义一个用于绑定的数据源DefinitionNode,如下: 2、数据源的定义 public class DefinitionNode { public string Name { get; set; } public IList<DefinitionNode> Children { get; set; } }上面的两步定义数据源模型及绑定数据 3

Activate command on TreeViewItem click, VSCode Extension

不羁岁月 提交于 2020-03-21 19:26:16
问题 I would like to run a command on the click of a tree view item, rather than in a menu that comes up. Right now in my package.json, I have this: { "command": "test.view.showError", "when": "view == test.view && viewItem == test", "group": "inline" } Right now, "inline" will put an icon next to the words which you have to click to run the command, but I would like the command to run when I click on the node itself. What do I change "group" to? Or do I do something different entirely? Thanks 回答1