MESCIUS SPREAD for Windows Forms 17.0J
PasswordChar プロパティ (GcTextBoxCellType)

単一行のテキストコントロールで、パスワードの文字の代わりに表示するプレースホルダ文字を取得または設定します。
構文
'Declaration
 
Public Property PasswordChar As Char
public char PasswordChar {get; set;}

プロパティ値

プレースホルダ文字を表す<b><see cref="T:System.Char">Char</see></b>値。 既定値は<b>\0</b>です。
解説

<b>PasswordChar</b>を使用して、ダイアログボックスにパスワードフィールドを作成できます。任意の半角文字を使用できますが、Windowsベースのアプリケーションではアスタリスク(*)(Chr(42))を使うのが一般的です。

このプロパティはGcTextBox.Textプロパティには影響しません。GcTextBox.Textにはユーザーが入力した文字列、またはコードから設定した文字列がそのまま格納されます。PasswordCharを0(デフォルト値)に設定すると、コントロールの実際のテキストが表示されます。

次のサンプルコードは、PasswordChar プロパティを使用します。
GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType gctext = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
gctext.PasswordChar = Convert.ToChar("A");
fpSpread1.Sheets[0].Cells[0, 0].CellType = gctext;
Dim gctext As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
gctext.PasswordChar = Chr(65)
fpSpread1.Sheets(0).Cells(0, 0).CellType = gctext
参照

GcTextBoxCellType クラス
GcTextBoxCellType メンバ

 

 


© MESCIUS inc. All rights reserved.