GrapeCity MultiRow Windows Forms Documentation
ShowDropDownButton Property (ComboBoxCell)
Example 


Gets or sets a value that indicates how to show the drop-down button when the ComboBoxCell is not in edit mode.
Syntax
<SRDescriptionAttribute("Indicates how to show the DropDown button when the cell is not in edit mode.
")>
<SRCategoryAttribute("Appearance")>
<DefaultValueAttribute()>
Public Property ShowDropDownButton As CellButtonVisibility
Dim instance As ComboBoxCell
Dim value As CellButtonVisibility
 
instance.ShowDropDownButton = value
 
value = instance.ShowDropDownButton
[SRDescription("Indicates how to show the DropDown button when the cell is not in edit mode.
")]
[SRCategory("Appearance")]
[DefaultValue()]
public CellButtonVisibility ShowDropDownButton {get; set;}

Property Value

One of the CellButtonVisibility values that indicates how to show the drop-down button when the cell is not in edit mode. The default is CellButtonVisibility.ShowAlways.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not one of the CellButtonVisibility values.
Remarks
The ShowDropDownButton property affects the appearance of the cell when it is not in edit mode, and regardless of whether it is read-only. When the cell is in edit mode, it always looks like a System.Windows.Forms.ComboBox control.
Example
The following code example shows how to customize a combo box cell's behavior or appearance. This code example is part of a larger example provided for the ComboBoxCell class.
ComboBoxCell CreateComboBoxCellHiddenDropDownButton()
        {
            ComboBoxCell comboBoxCell = new ComboBoxCell();

            comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown;

            // Hide drop down button when not in edit mode.
            comboBoxCell.ShowDropDownButton = CellButtonVisibility.NotShown;

            comboBoxCell.Items.AddRange("Item1", "Item2");

            return comboBoxCell;
        }
Private Function CreateComboBoxCellHiddenDropDownButton() As ComboBoxCell
        Dim comboBoxCell As New ComboBoxCell()

        comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown

        ' Hide drop down button when not in edit mode.
        comboBoxCell.ShowDropDownButton = CellButtonVisibility.NotShown

        comboBoxCell.Items.AddRange("Item1", "Item2")

        Return comboBoxCell
    End Function
Requirements

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

See Also

Reference

ComboBoxCell Class
ComboBoxCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.