public TableChildRendererBase(TableControl tableControl) { _tableControl = tableControl; DisabledTextColor = SystemColors.GrayText; //row highlighting type default RowHighlitingStyle = RowHighlightType.BackgroundControls; }
/// <summary> /// constructor /// </summary> /// <param name="idx"></param> /// <param name="tableControl"></param> internal TableItem(int idx, TableControl tableControl) { _tableControl = tableControl; Idx = idx; Controls = null; IsValid = true; RowBGColor = Color.Empty; IsVisibe = true; }
/// <summary> /// constructor /// </summary> /// <param name="table"></param> /// <param name="row"></param> /// <param name="columnIdx"></param> public TableEditor(TableControl table, int row, TableColumn column) : base(table) { RowIdx = row; Column = column; // Register TableControl.RowHeightChanged event so as to adjust the height // according to row height. table.RowHeightChanged += new EventHandler(OnRowHeightChanged); }
private void TableControlDesigner_ControlAdded(object sender, ControlEventArgs e) { // Record instance of control we're designing if (e.Control is TableControl) { tableControl = ((Control)Component).Controls[0] as TableControl; tableControl.CollectionChanged += new NotifyCollectionChangedEventHandler(tableControl_CollectionChanged); SetVerbStatus(); } }
/// <summary> /// calculate editor bounds /// </summary> /// <returns></returns> public override Rectangle Bounds() { Rectangle rect = new Rectangle(); if (_column != null) { rect = ((TableControl)parentControl).getCellRect(_column.Index, RowIdx); if (IsHeaderEditor) { ICoordinator coordinator = BoundsComputer as ICoordinator; if (coordinator != null) { if (coordinator.X < 0) { TableControl tableControl = (TableControl)parentControl; // Defect# 130148: When a column is re-ordered with 1st column, then only use actual co-ordinates for X, // otherwise this problem occurs i.e. control from 1st column remains at same location if ((!(tableControl.RightToLeftLayout) && _column.Index == 0) || (tableControl.RightToLeftLayout && tableControl.ColumnCount - 1 == _column.Index)) { rect.X = coordinator.X; } } rect.Y = coordinator.Y < 0 ? coordinator.Y : 0; } rect.Height = Math.Abs(rect.Y) + ((TableControl)parentControl).Height; if (((TableControl)parentControl).RightToLeftLayout) { rect.Width = rect.Width + rect.X; rect.X = 0; } else { rect.Width = parentControl.Bounds.Width - rect.X; } } } // Defect 140258: If header control is hidden when column to which it is attached is hidden, // BoundsComputer is null. So return empty rectangle in this case. if (BoundsComputer != null) { return(BoundsComputer.computeEditorBounds(rect, IsHeaderEditor)); } else { return(Rectangle.Empty); } }
public LogicalColumnHelper(TableControl tableControl, int mgColumnIdx, bool createTableColumn) { _tableControl = tableControl; _mgColumnIdx = mgColumnIdx; _placement = true; if (createTableColumn) { int insertIdx = _tableControl.RightToLeftLayout ? 0 : _tableControl.Columns.Count;; _tableColumn = new TableColumn(); _tableControl.Columns.Insert(insertIdx, _tableColumn); Visible = true; } }
internal static HeaderRenderer GetRenderer(TableControl tableControl, Header header) { switch (tableControl.ControlStyle) { case ControlStyle.TwoD: return(new TwoDStyleHeaderRenderer(tableControl, header)); case ControlStyle.ThreeD: return(new ThreeDRaisedStyleHeaderRenderer(tableControl, header)); case ControlStyle.Windows3d: return(new WindowsThreeDStyleHeaderRenderer(tableControl, header)); default: return(new WindowsStyleHeaderRenderer(tableControl, header)); } }
public override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); // #297589. Do not show the grids on table control. BindingFlags bindingAttrs = BindingFlags.Instance | BindingFlags.NonPublic; Type classType = typeof(ParentControlDesigner); MemberInfo[] memberinfos = classType.GetMember("DrawGrid", bindingAttrs); PropertyInfo propInfo = memberinfos[0] as PropertyInfo; propInfo.SetValue(this, false, null); // Record instance of control we're designing tableControl = (TableControl)component; // Hook up events //ISelectionService s = (ISelectionService)GetService(typeof(ISelectionService)); IComponentChangeService c = (IComponentChangeService)GetService(typeof(IComponentChangeService)); canParentProvider = new CanParentProvider(this); dragDropHandler = new TableControlDragDropHandler((Control)component, this.BehaviorService, (IDesignerHost)this.GetService(typeof(IDesignerHost))); }
public TableMultiColumnStrategyBase(TableControl tableControl) { this.tableControl = tableControl; }
public TableMultiColumnEnabledStrategy(TableControl tableControl) : base(tableControl) { }
public ThreeDStyleHeaderRenderer(TableControl tableControl, Header header) : base(tableControl, header) { }
public ThreeDRaisedStyleHeaderRenderer(TableControl tableControl, Header header) : base(tableControl, header) { header.BeforeSectionTrack += Header_BeforeSectionTrack; header.AfterSectionTrack += Header_AfterSectionTrack; }
public TableEditor(TableControl table) : this(table, 0, null) { }
/// <summary> /// constructor /// </summary> /// <param name="table"></param> /// <param name="row"></param> /// <param name="columnIdx"></param> public TableEditor(TableControl table, int row, int columnIdx) : base(table) { }
public TableEditor(TableControl table) : this(table, 0, TableControl.TAIL_COLUMN_IDX) { }
public WindowsStyleHeaderRenderer(TableControl tableControl, Header header) : base(tableControl, header) { }
public TableColumns(TableControl tableControl) { this.tableControl = tableControl; Columns = new ObservableCollection <TableColumn>(); }
public HeaderRenderer(TableControl tableControl, Header header) { this.tableControl = tableControl; this.header = header; UpdateTitleBrush(); }