GrapeCity.Win.Common 名前空間 > PlusPakPickerBase クラス : SideButtons プロパティ |
Public ReadOnly Property SideButtons As SideButtonCollection
public SideButtonCollection SideButtons {get;}
// Show or hide side buttons for gcComboFrame1 when comboBox1's selected index is changed. private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e) { foreach (SideButtonBase sideButton in this.gcComboFrame1.SideButtons) { if (sideButton.Name == this.comboBox1.Text) { // Shows the side button selected from comboBox1. sideButton.Visible = ButtonVisibility.ShowAlways; } else { // Hides the side button that are not selected from comboBox1. sideButton.Visible = ButtonVisibility.NotShown; } } // Always show the DropDownButton. this.gcComboFrame1.SideButtons["DropDownButton"].Visible = ButtonVisibility.ShowAlways; }
' Show or hide side buttons for gcComboFrame1 when comboBox1's selected index is changed. Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) For Each sideButton As SideButtonBase In Me.gcComboFrame1.SideButtons If sideButton.Name = Me.comboBox1.Text Then ' Shows the side button selected from comboBox1. sideButton.Visible = ButtonVisibility.ShowAlways Else ' Hides the side button that are not selected from comboBox1. sideButton.Visible = ButtonVisibility.NotShown End If Next ' Always show the DropDownButton. Me.gcComboFrame1.SideButtons("DropDownButton").Visible = ButtonVisibility.ShowAlways 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