PowerTools MultiRow for Windows Forms 8.0J
SideButtons プロパティ (GcDateTimeCell)
使用例 

GcDateTimeCellのサイドボタンを取得します。
構文
Public ReadOnly Property SideButtons As SideButtonCollection
public SideButtonCollection SideButtons {get;}

プロパティ値

コレクションを示すSideButtonCollection
使用例
以下のサンプルコードは、サイドボタンを追加する使用例です。このコードは GcDateTimeCell のサンプルコードの一部です。
private void SetShortcutsAndSideButtons(GcDateTimeCell gcDateTimeCell1)
{
    //In edit mode, hit the CTR+N to set date to DateTime.Now
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control | Keys.N, "SetNow");
    //In edit mode, hit the CTR+Right to move to next field, if arrive last field, then jump to next Cell.
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control | Keys.Right, "NextFieldThenCell");
    //In edit mode, hit the CTR+Left to move to previous field, if arrive first field, then jump to previous Cell.
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control | Keys.Left, "PreviousFieldThenCell");

    gcDateTimeCell1.SideButtons.Clear();
    gcDateTimeCell1.SideButtons.Add(new SpinButton());
}
Private Sub SetShortcutsAndSideButtons(ByVal gcDateTimeCell1 As GcDateTimeCell)
    'In edit mode, hit the CTR+N to set date to DateTime.Now
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control Or Keys.N, "SetNow")
    'In edit mode, hit the CTR+Right to move to next field, if arrive last field, then jump to next Cell.
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control Or Keys.Right, "NextFieldThenCell")
    'In edit mode, hit the CTR+Left to move to previous field, if arrive first field, then jump to previous Cell.
    gcDateTimeCell1.ShortcutKeys.Add(Keys.Control Or Keys.Left, "PreviousFieldThenCell")

    gcDateTimeCell1.SideButtons.Clear()
    gcDateTimeCell1.SideButtons.Add(New SpinButton())
End Sub
参照

GcDateTimeCell クラス
GcDateTimeCell メンバ

 

 


© 2008-2015 GrapeCity inc. All rights reserved.