TextBoxBase.BackColor プロパティ
定義
コントロールの背景色を取得または設定します。Gets or sets the background color of the control.
public:
virtual property System::Drawing::Color BackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Public Overrides Property BackColor As Color
プロパティ値
注釈
BackColorプロパティを使用して、テキストコントロールの背景色をフォームの配色に合わせて変更することができます。You can use the BackColor property to change the background color of the text control to blend into the color scheme of your forms.
コントロール内のテキストの色を変更するには、 ForeColorプロパティを使用します。To change the color of the text within the control, use the ForeColor property. テキストコントロールのBackColorプロパティを設定するときは、選択した色によってコントロールのテキストが非表示にならないようにしてください。When setting the BackColor property of your text control, ensure that the color you choose does not cause the text of the control to disappear. たとえば、プロパティとBackColor ForeColorプロパティの両方がにColor.Black
設定されている場合、テキストボックスコントロール内のテキストは表示されません。For example, if the BackColor and ForeColor properties are both set to Color.Black
, the text within your textbox control will not be visible.
のプロパティReadOnly がにtrue
設定されている場合、このプロパティはオーバーライドされる可能性があります。 TextBoxBaseThis property might be over ridden if the ReadOnly property of the TextBoxBase is set to true
.