GrapeCity.Win.Common 名前空間 : ButtonPosition 列挙体 |
Public Enum ButtonPosition Inherits System.Enum
public enum ButtonPosition : System.Enum
メンバ | 解説 |
---|---|
LeftInside | ボタンは、境界線の左内側に配置されます。 |
LeftOutside | ボタンは、境界線の左外側に配置されます。 |
RightInside | ボタンは、境界線の右内側に配置されます。 |
RightOutside | ボタンは、境界線の右外側に配置されます。 |
// Returns a SideButton instance for gcComboFrame1. private SideButtonBase CreateSideButton() { SideButton sideButton = new SideButton(); // Specify a unique name for this button. sideButton.Name = "SideButton"; // Set button text. sideButton.Text = "Add a item"; // Set button's width. sideButton.ButtonWidth = 70; // Set this side button not to show in GcComboFrame. sideButton.Visible = ButtonVisibility.NotShown; // Set this side button to position at outside of GcComboFrame's right border. sideButton.Position = ButtonPosition.RightOutside; // Set the fat appearance for this button, and these settings will take effect when // its associated GcComboFrame's FlatStyle is Flat. sideButton.FlatAppearance.BorderColor = Color.Red; sideButton.FlatAppearance.BorderSize = 2; sideButton.FlatAppearance.CheckedBackColor = Color.Blue; sideButton.FlatAppearance.MouseDownBackColor = Color.Yellow; sideButton.FlatAppearance.MouseOverBackColor = Color.Green; sideButton.Click += new EventHandler(SideButton_Click); return sideButton; } // Add a item into listBox1 when SideButton is clicked. private void SideButton_Click(object sender, EventArgs e) { if (this.textBox1.Text != string.Empty) { this.listBox1.Items.Add(this.textBox1.Text); this.textBox1.Clear(); } else { MessageBox.Show("You must input a string first !"); } }
' Returns a SideButton instance for gcComboFrame1. Private Function CreateSideButton() As SideButtonBase Dim sideButton As New SideButton() ' Specify a unique name for this button. sideButton.Name = "SideButton" ' Set button text. sideButton.Text = "Add a item" ' Set button's width. sideButton.ButtonWidth = 70 ' Set this side button not to show in GcComboFrame. sideButton.Visible = ButtonVisibility.NotShown ' Set this side button to position at outside of GcComboFrame's right border. sideButton.Position = ButtonPosition.RightOutside ' Set the fat appearance for this button, and these settings will take effect when ' its associated GcComboFrame's FlatStyle is Flat. sideButton.FlatAppearance.BorderColor = Color.Red sideButton.FlatAppearance.BorderSize = 2 sideButton.FlatAppearance.CheckedBackColor = Color.Blue sideButton.FlatAppearance.MouseDownBackColor = Color.Yellow sideButton.FlatAppearance.MouseOverBackColor = Color.Green AddHandler sideButton.Click, AddressOf SideButton_Click Return sideButton End Function ' Add a item into listBox1 when SideButton is clicked. Private Sub SideButton_Click(ByVal sender As Object, ByVal e As EventArgs) If Me.textBox1.Text <> String.Empty Then Me.listBox1.Items.Add(Me.textBox1.Text) Me.textBox1.Clear() Else MessageBox.Show("You must input a string first !") End If End Sub
System.Object
System.ValueType
System.Enum
GrapeCity.Win.Common.ButtonPosition
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