แก้ไข

แชร์ผ่าน


PanelContainerDesigner.FrameCaption Property

Definition

Gets the caption that appears on the associated Panel control.

public:
 virtual property System::String ^ FrameCaption { System::String ^ get(); };
public override string FrameCaption { get; }
member this.FrameCaption : string
Public Overrides ReadOnly Property FrameCaption As String

Property Value

A string that contains the panel caption.

Examples

The following code example shows how to override the FrameCaption property in a class that is inherited from the PanelContainerDesigner class to change the appearance of a control that is derived from the Panel class at design time. The example provides a default caption for the associated control, if none was defined.

// Provide a design-time caption for the panel.
public override string FrameCaption 
{
    get
    {
        // If the FrameCaption is empty, use the panel control ID.
        string localCaption = base.FrameCaption;
        if (localCaption == null || localCaption == "")
            localCaption = ((Panel)Component).ID.ToString();

        return localCaption;
    }
} // FrameCaption
' Provide a design-time caption for the panel.
Public Overrides ReadOnly Property FrameCaption() As String
    Get
        ' If the FrameCaption is empty, use the panel control ID.
        Dim localCaption As String = MyBase.FrameCaption
        If localCaption Is Nothing Or localCaption = "" Then
            localCaption = CType(Component, Panel).ID.ToString()
        End If

        Return localCaption
    End Get
End Property ' FrameCaption

Remarks

The FrameCaption property returns the GroupingText property of the associated Panel control.

Applies to

See also