GrapeCity.Win.MultiRow.v80 アセンブリ > GrapeCity.Win.MultiRow 名前空間 > RowHeaderCell クラス : RowHeaderCell コンストラクタ |
このコンストラクターは、Cell.ResizeModeプロパティの値をResizeMode.Verticalに初期化します。
このコンストラクターは、SelectionModeプロパティの値をMultiRowSelectionMode.Rowに初期化します。
このコンストラクターは、HoverDirectionプロパティの値をHoverDirection.Rightに初期化します。
private Cell[] CreateCellsInRow() { RowHeaderCell rowHeaderCell1 = new RowHeaderCell(); rowHeaderCell1.Size = new Size(36, 21); rowHeaderCell1.ValueFormat = "1"; //The cell's bottom will draw one gutter. rowHeaderCell1.GutterStyles = GutterStyles.Bottom; //The cell's right will draw hover effect. rowHeaderCell1.HoverDirection = HoverDirection.Right; //Use the CellStyle.BackColor to draw the HeaderCell's background, don's use the Vistual Style back color. rowHeaderCell1.FlatStyle = FlatStyle.Standard; rowHeaderCell1.UseVisualStyleBackColor = false; rowHeaderCell1.Style.BackColor = Color.DarkGoldenrod; rowHeaderCell1.Style.SelectionBackColor = Color.LightBlue; TextBoxCell textBoxCell1 = new TextBoxCell(); textBoxCell1.Size = new Size(80, 21); textBoxCell1.Location = new Point(rowHeaderCell1.Left + rowHeaderCell1.Width, 0); TextBoxCell textBoxCell2 = textBoxCell1.Clone() as TextBoxCell; textBoxCell2.Location = new Point(textBoxCell1.Left + textBoxCell1.Width, 0); Cell[] cells = new Cell[] { rowHeaderCell1, textBoxCell1, textBoxCell2 }; return cells; }
Private Function CreateCellsInRow() As Cell() Dim rowHeaderCell1 As New RowHeaderCell() rowHeaderCell1.Size = New Size(36, 21) rowHeaderCell1.ValueFormat = "1" 'The cell's bottom will draw one gutter. rowHeaderCell1.GutterStyles = GutterStyles.Bottom 'The cell's right will draw hover effect. rowHeaderCell1.HoverDirection = HoverDirection.Right 'Use the CellStyle.BackColor to draw the HeaderCell's background, don's use the Vistual Style back color. rowHeaderCell1.FlatStyle = FlatStyle.Standard rowHeaderCell1.UseVisualStyleBackColor = False rowHeaderCell1.Style.BackColor = Color.DarkGoldenrod rowHeaderCell1.Style.SelectionBackColor = Color.LightBlue Dim textBoxCell1 As New TextBoxCell() textBoxCell1.Size = New Size(80, 21) textBoxCell1.Location = New Point(rowHeaderCell1.Left + rowHeaderCell1.Width, 0) Dim textBoxCell2 As TextBoxCell = TryCast(textBoxCell1.Clone(), TextBoxCell) textBoxCell2.Location = New Point(textBoxCell1.Left + textBoxCell1.Width, 0) Dim cells As Cell() = New Cell() {rowHeaderCell1, textBoxCell1, textBoxCell2} Return cells End Function