| GrapeCity.Win.MultiRow.v80 アセンブリ > GrapeCity.Win.MultiRow 名前空間 > DateTimePickerCell クラス : ShowDropDownButton プロパティ |
Public Property ShowDropDownButton As CellButtonVisibility
public CellButtonVisibility ShowDropDownButton {get; set;}
| 例外 | 解説 |
|---|---|
| System.ComponentModel.InvalidEnumArgumentException | 指定された値がCellButtonVisibility値の1つではありません。 |
セルが現在のセルのときにDateTimePickerCellにドロップダウンボタンを表示する場合は、このプロパティの値をCellButtonVisibility.ShowForCurrentCellに設定します。
ShowDropDownButtonプロパティは、セルが読み取り専用かどうかにかかわらず、編集モードでないときのセルの外観に影響します。セルが編集モードのときは、常にSystem.Windows.Forms.DateTimePickerコントロールのようになります。
| 注意: |
|---|
| ShowUpDownプロパティがtrueに設定されている場合、ShowDropDownButtonプロパティはスピンボタンにも影響します。 |
DateTimePickerCell CreateDateTimePickerCellHiddenDropDownButton()
{
DateTimePickerCell dateTimePickerCell1 = new DateTimePickerCell();
dateTimePickerCell1.Value = DateTime.Now;
dateTimePickerCell1.Size = new Size(120, 21);
// Hide drop down button when non edit status.
dateTimePickerCell1.ShowDropDownButton = CellButtonVisibility.NotShown;
return dateTimePickerCell1;
}
Private Function CreateDateTimePickerCellHiddenDropDownButton() As DateTimePickerCell Dim dateTimePickerCell1 As New DateTimePickerCell() dateTimePickerCell1.Value = DateTime.Now dateTimePickerCell1.Size = New Size(120, 21) ' Hide drop down button when non edit status. dateTimePickerCell1.ShowDropDownButton = CellButtonVisibility.NotShown Return dateTimePickerCell1 End Function