GrapeCity.Win.Pickers 名前空間 > GcColorPicker クラス : DisabledForeColor プロパティ |
次のサンプルコードは、DisabledBackColorプロパティとDisabledForeColorプロパティの使用方法を示します。このサンプルコードを実行するには、以下のコードをSystem.Windows.Forms.Formプロジェクトに追加し、ここで作成したメソッドをコンストラクターまたはフォーム上の別のメソッドから呼び出します。
private void CreateDisabledGcColorPicker() { // Create an instance of GcColorPicker control. GcColorPicker gcColorPicker = new GcColorPicker(); // Initialize the Name and Location of the gcColorPicker. gcColorPicker.Name = "gcColorPicker"; gcColorPicker.Location = new Point(10, 50); // Disables gcColorPicker. gcColorPicker.Enabled = false; // Set the background color and foreground color used when gcColorPicker is in the disabled state. gcColorPicker.DisabledBackColor = Color.SkyBlue; gcColorPicker.DisabledForeColor = Color.PaleTurquoise; // adds gcColorPicker to the form. this.Controls.Add(gcColorPicker); }
Private Sub CreateDisabledGcColorPicker() ' Create an instance of GcColorPicker control. Dim gcColorPicker As New GcColorPicker() ' Initialize the Name and Location of the gcColorPicker. gcColorPicker.Name = "gcColorPicker" gcColorPicker.Location = New Point(10, 50) ' Disables gcColorPicker. gcColorPicker.Enabled = False ' Set the background color and foreground color used when gcColorPicker is in the disabled state. gcColorPicker.DisabledBackColor = Color.SkyBlue gcColorPicker.DisabledForeColor = Color.PaleTurquoise ' adds gcColorPicker to the form. Me.Controls.Add(gcColorPicker) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2