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

入力候補値を表示するかどうかを示す値を取得または設定します。
構文
Public Property ShowRecommendedValue As Boolean
public bool ShowRecommendedValue {get; set;}

プロパティ値

入力候補値を表示する場合はtrue。それ以外の場合はfalse
既定値はfalseです。
解説
このShowRecommendedValueがtrueの場合、値が完全に入力されていないときにRecommendedValue プロパティの値が表示されます。それ以外の場合、RecommendedValue プロパティの値は表示されません。
使用例
入力候補値を設定した GcTimeSpan コントロールを作成するコード例を次に示します。この例では他に RecommendedValue と ShowRecommendedValue プロパティを使用しています。
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void SetRecommendedValueSettings()
{
    // Creates an instance of a GcTimeSpan control.
    GcTimeSpan gcTimeSpan1 = new GcTimeSpan();
    // Sets the RecommendedValue to DateTime.Now.
    gcTimeSpan1.RecommendedValue = TimeSpan.Parse("00:00:00");
    // Sets the ShowRecommendedValue to true, the control will display the RecommendedValue if the value is null.
    gcTimeSpan1.ShowRecommendedValue = true;            
    // Sets the value of the GcTimeSpan to null.
    gcTimeSpan1.Clear();
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub SetRecommendedValueSettings()
    ' Creates an instance of a GcTimeSpan control.
    Dim gcTimeSpan1 As New GcTimeSpan()
    ' Sets the RecommendedValue to DateTime.Now.
    gcTimeSpan1.RecommendedValue = TimeSpan.Parse("00:00:00")
    ' Sets the ShowRecommendedValue to true, the control will display the RecommendedValue if the value is null.
    gcTimeSpan1.ShowRecommendedValue = True
    ' Sets the value of the GcTimeSpan to null.
    gcTimeSpan1.Clear()
End Sub
参照

GcTimeSpan クラス
GcTimeSpan メンバ
RecommendedValue プロパティ

 

 


© 2004-2015 GrapeCity inc. All rights reserved.