PanelContainerDesigner.FrameCaption 属性

定义

获取在关联 Panel 控件上显示的标题。

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

属性值

String

包含面板标题的字符串。

示例

下面的代码示例演示如何重写 FrameCaption 从类继承的 PanelContainerDesigner 类中的属性,以更改设计时派 Panel 生自该类的控件的外观。 如果未定义任何内容,则此示例为关联的控件提供默认标题。

// 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

注解

FrameCaption 属性返回 GroupingText 关联 Panel 控件的属性。

适用于

另请参阅