public ButtonCell GetButtonCell(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleCenter) { return(new ButtonCell() { Style = GetDefaultCellStyle(align) }); }
private GcDateTimeCell GetDateCellEditBase(MultiRowContentAlignment align, bool isInput, string format = "yyyy/MM/dd") { var cell = new GcDateTimeCell(); cell.Fields.Clear(); cell.DisplayFields.Clear(); cell.HighlightText = GrapeCity.Win.Editors.HighlightText.All; cell.Spin.AllowSpin = false; cell.ShortcutKeys.Remove(Keys.F2); cell.ShortcutKeys.Remove(Keys.F4); cell.ShortcutKeys.Remove(Keys.F5); cell.SideButtons[0].BackColor = SystemColors.Control; cell.Style = GetDefaultCellStyle(align); if (isInput) { cell.Style.DataSourceNullValue = null; } else { cell.SideButtons.Clear(); } if (!string.IsNullOrEmpty(format)) { cell.Fields.AddRange(format); } return(cell); }
public ComboBoxCell GetComboBoxCell(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleLeft) { var cell = new ComboBoxCell(); cell.FlatStyle = FlatStyle.Flat; cell.DropDownStyle = MultiRowComboBoxStyle.DropDownList; cell.Style = GetDefaultCellStyle(align); return(cell); }
public HeaderCell GetHeaderCell(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleCenter) { return(new HeaderCell() { FlatStyle = FlatStyle.System, Style = new CellStyle { BackColor = SystemColors.Control, Font = Font, TextAlign = align } }); }
private CellStyle GetDefaultCellStyle(MultiRowContentAlignment align, ImeMode imeMode = ImeMode.Disable) { return(new CellStyle() { Border = border, DisabledForeColor = Color.Black, Font = Font, ForeColor = Color.Black, ImeMode = imeMode, //InputScope = GetInputScope(imeMode), ImeSentenceMode = ImeSentenceMode.Normal, Padding = new Padding(2, -1, 2, -1), TextEffect = TextEffect.Flat, TextAlign = align, WordWrap = MultiRowTriState.False }); }
public GcNumberCell GetNumberCell(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleRight, string fieldFormat = "#,###,###,###,###", string displayFormat = "#,###,###,###,##0") { var cell = new GcNumberCell(); cell.ExitOnArrowKey = true; cell.Fields.SetFields(fieldFormat, "", "", "-", ""); cell.DisplayFields.AddRange(displayFormat, "", "", "-", ""); cell.Fields.IntegerPart.MinDigits = 1; cell.FlatStyle = FlatStyle.Flat; cell.Spin.AllowSpin = false; cell.ShortcutKeys.Remove(Keys.F2); cell.ShortcutKeys.Remove(Keys.F4); cell.Style = GetDefaultCellStyle(align); cell.SideButtons.Clear(); cell.MaxValue = 9999999999999M; cell.MinValue = -9999999999999M; cell.MaxMinBehavior = GrapeCity.Win.Editors.MaxMinBehavior.AdjustToMaxMin; return(cell); }
public GcTextBoxCell GetTextBoxCell(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleLeft , ImeMode ime = ImeMode.NoControl, string format = null, int?maxLength = null, bool isNumberCell = false , GrapeCity.Win.Editors.LengthUnit maxLengthUnit = GrapeCity.Win.Editors.LengthUnit.Char) { var cell = !isNumberCell ? new GcTextBoxCell() : new GcNumberTextBoxCell(); cell.AutoComplete.CandidateListItemFont = Font; cell.AutoComplete.HighlightStyle.Font = Font; cell.Format = format; if (maxLength.HasValue) { cell.MaxLength = maxLength.Value; } cell.ExitOnArrowKey = true; cell.ShortcutKeys.Remove(Keys.F2); cell.ShortcutKeys.Remove(Keys.F4); cell.Style = GetDefaultCellStyle(align, ime); cell.MaxLengthUnit = maxLengthUnit; return(cell); }
public GcDateTimeCell GetDateCell_yyyyMMdd_Jp(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleCenter, bool isInput = false) => GetDateCellEditBase(align, isInput, "yyyy年MM月dd日");
public GcDateTimeCell GetDateCell_MMdd(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleCenter, bool isInput = false) => GetDateCellEditBase(align, isInput, "MM/dd");
public GcDateTimeCell GetDateCell_yyyyMMddHHmmss(MultiRowContentAlignment align = MultiRowContentAlignment.MiddleCenter, bool isInput = false) => GetDateCellEditBase(align, isInput, "yyyy/MM/dd HH:mm:ss");