コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }