PowerTools InputMan for Windows Forms 8.0J
Spin プロパティ (GcDateTime)
使用例 

スピンボタンを動作を設定するDateSpinオブジェクトを取得または設定します。
構文
Public ReadOnly Property Spin As DateSpin
public DateSpin Spin {get;}

プロパティ値

スピンボタンを動作を設定するDateSpinオブジェクト。
解説
このSpin プロパティを設定することで、スピン動作をカスタマイズできます。
使用例
スピンアップ機能とスピンダウン機能を利用した GcDateTime コントロールを作成するコード例を次に示します。
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void SetSpinSettings()
{
    // Creates an instance of a GcDateTime control.
    GcDateTime GcDateTime1 = new GcDateTime();
    // Sets the AllowSpin to true.
    GcDateTime1.Spin.AllowSpin = true;
    // Sets the SpinMode to DateSpinMode.Value. No matter which field the caret is in, the value of the control spins.
    GcDateTime1.Spin.SpinMode = DateSpinMode.Value;
    // Sets the Wrap to false. When the value is the maximum or minimum, it can't spin any more.
    GcDateTime1.Spin.Wrap = false;
    // Sets the IncrementValue to "1:00:00", the value of the control will change 1 day every time.
    GcDateTime1.Spin.IncrementValue = TimeSpan.Parse("1:00:00");
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub SetSpinSettings()
    ' Creates an instance of a GcDateTime control.
    Dim GcDateTime1 As New GcDateTime()
    ' Sets the AllowSpin to true.
    GcDateTime1.Spin.AllowSpin = True
    ' Sets the SpinMode to DateSpinMode.Value. No matter which field the caret is in, the value of the control spins.
    GcDateTime1.Spin.SpinMode = DateSpinMode.Value
    ' Sets the Wrap to false. When the value is the maximum or minimum, it can't spin any more.
    GcDateTime1.Spin.Wrap = False
    ' Sets the IncrementValue to "1:00:00", the value of the control will change 1 day every time.
    GcDateTime1.Spin.IncrementValue = TimeSpan.Parse("1:00:00")
End Sub
参照

GcDateTime クラス
GcDateTime メンバ

 

 


© 2004-2015 GrapeCity inc. All rights reserved.