示例#1
0
        public EGUITreeView(GridViewModel model)
        {
            ViewState = new TreeViewState();
            ViewModel = model;

            treeView = new GridTreeView(ViewState, ViewModel)
            {
                OnDrawRowItem         = OnDrawRowItem,
                OnGetRowHeight        = GetRowHeight,
                OnItemContextClicked  = OnItemContextClicked,
                OnItemDoubleClicked   = OnItemDoubleClicked,
                OnItemSelectedChanged = OnItemSelectedChanged,
            };
            treeView.Reload();
        }
示例#2
0
        protected EGUITreeView()
        {
            ViewState = new TreeViewState();
            ViewModel = new GridViewModel();

            treeView = new GridTreeView(ViewState, ViewModel)
            {
                OnDrawRowItem         = OnDrawRowItem,
                OnGetRowHeight        = GetRowHeight,
                OnItemContextClicked  = OnItemContextClicked,
                OnItemDoubleClicked   = OnItemDoubleClicked,
                OnItemSelectedChanged = OnItemSelectedChanged,

                IsMultiSelect = false,
            };
            treeView.Reload();
        }
        public EGUIGridView(GridViewModel model, string[] columnTitles)
        {
            ViewState  = new TreeViewState();
            ViewModel  = model;
            ViewHeader = new GridViewHeader(columnTitles);

            treeView = new GridTreeView(ViewState, ViewHeader.GetTreeViewHeader(), ViewModel)
            {
                OnDrawColumnItem     = OnDrawColumnItem,
                OnGetRowHeight       = GetRowHeight,
                OnItemContextClicked = OnItemContextClicked,
                OnItemDoubleClicked  = OnItemDoubleClicked,
            };
            treeView.Reload();

            treeView.multiColumnHeader.ResizeToFit();
        }
        public EGUIGridView(GridViewModel model, GridViewHeader header)
        {
            ViewState  = new TreeViewState();
            ViewModel  = model;
            ViewHeader = header;

            treeView = new GridTreeView(ViewState, header.GetTreeViewHeader(), ViewModel)
            {
                OnDrawColumnItem      = OnDrawColumnItem,
                OnGetRowHeight        = GetRowHeight,
                OnItemContextClicked  = OnItemContextClicked,
                OnItemDoubleClicked   = OnItemDoubleClicked,
                OnItemSelectedChanged = OnItemSelectedChanged,

                IsMultiSelect = false,
            };

            treeView.Reload();
            treeView.multiColumnHeader.ResizeToFit();
        }
示例#5
0
 public void Reload()
 {
     treeView?.Reload();
 }