GrapeCity SPREAD for WPF 2.0J
AcceptsReturn プロパティ (TextCellType)

ユーザーが ENTER キーを押したときに編集要素がどのように反応するかを示す値を取得または設定します。
構文
'Declaration
 
Public Property AcceptsReturn As Boolean
public bool AcceptsReturn {get; set;}

プロパティ値

ENTER キーを押したときに現在のカーソル位置に新しい行を挿入する場合は true。それ以外の場合、ENTER キーは無視されます。既定値は false です。
次のサンプルはTextCellTypeを作成しEnterキーによる複数行入力およびウォーターマーク関連のプロパティを設定します。
public void SetTextCell1()
{
    TextCellType textCellType1 = new TextCellType();
    textCellType1.Multiline = true;
    textCellType1.AcceptsReturn = true;
    textCellType1.WatermarkDisplayNull = "DisplayNullText";
    textCellType1.WatermarkDisplayNullForeground = new SolidColorBrush(Colors.Gray);
    textCellType1.WatermarkNull = "NullText";
    textCellType1.WatermarkNullForeground = new SolidColorBrush(Colors.Gray);

    this._gcSpreadGrid1[0, 0].CellType = textCellType1;
}
Public Sub SetTextCell1()
    Dim textCellType1 As New TextCellType()
    textCellType1.Multiline = True
    textCellType1.AcceptsReturn = True
    textCellType1.WatermarkDisplayNull = "DisplayNullText"
    textCellType1.WatermarkDisplayNullForeground = New SolidColorBrush(Colors.Gray)
    textCellType1.WatermarkNull = "NullText"
    textCellType1.WatermarkNullForeground = New SolidColorBrush(Colors.Gray)

    Me._gcSpreadGrid1(0, 0).CellType = textCellType1
End Sub
参照

TextCellType クラス
TextCellType メンバ

 

 


Copyright © 2012 GrapeCity inc. All rights reserved.