GrapeCity MultiRow Windows Forms Documentation
ShowButton Property
Example 


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

Property Value

One of the CellButtonVisibility enumerations that represent how to display the pop-up button when the cell is not in edit mode. The default is CellButtonVisibility.ShowAlways.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not a CellButtonVisibility value.
Remarks

If you want PopupCell to display the button when the cell is the current cell, set this property value to CellButtonVisibility.ShowForCurrentCell.

The ShowButton property effects 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.TextBox control with a System.Windows.Forms.Button beside it.

Example
The following code example shows how to customize a pop-up cell's behavior or appearance. This code example is part of a larger example provided for the PopupCell class.
PopupCell CreateHiddenButtonPopupCell()
        {
            PopupCell popupCell1 = new PopupCell();

            popupCell1.ShowButton = CellButtonVisibility.NotShown;
            popupCell1.Size = new Size(130, 21);

            // Show OpenFileDialog to edit file name.
            popupCell1.Popup = new OpenFileDialog();
            popupCell1.PopupValueMember = "FileName";

            return popupCell1;
        }
Private Function CreateHiddenButtonPopupCell() As PopupCell
        Dim popupCell1 As New PopupCell()

        popupCell1.ShowButton = CellButtonVisibility.NotShown
        popupCell1.Size = New Size(130, 21)

        ' Show OpenFileDialog to edit file name.
        popupCell1.Popup = New OpenFileDialog()
        popupCell1.PopupValueMember = "FileName"

        Return popupCell1
    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

PopupCell Class
PopupCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.