TabPage.ToString 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
Text 속성 값이 포함된 문자열을 반환합니다.
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
반환
Text 속성 값이 포함된 문자열입니다.
예제
다음 코드 예제에서는 를 사용하여 를 TabControlTabPage만듭니다. 메서드는 ToString 에 대한 값을 포함하는 문자열을 TexttabPage1
만들고 속성에 tabPage1
ToolTipText 반환합니다.
using namespace System::Drawing;
using namespace System::Windows::Forms;
public ref class Form1: public Form
{
private:
TabControl^ tabControl1;
TabPage^ tabPage1;
void MyTabs()
{
this->tabControl1 = gcnew TabControl;
this->tabPage1 = gcnew TabPage;
this->tabControl1->Controls->Add( tabPage1 );
this->tabControl1->Location = Point(25,25);
this->tabControl1->Size = System::Drawing::Size( 250, 250 );
this->tabControl1->ShowToolTips = true;
this->tabPage1->Text = "myTabPage1";
// Creates a string showing the Text value for tabPage1.
// Then assigns the string to ToolTipText.
this->tabPage1->ToolTipText = tabPage1->ToString();
this->ClientSize = System::Drawing::Size( 300, 300 );
this->Controls->Add( tabControl1 );
}
public:
Form1()
{
MyTabs();
}
};
int main()
{
Application::Run( gcnew Form1 );
}
using System.Drawing;
using System.Windows.Forms;
public class Form1 : Form
{
private TabControl tabControl1;
private TabPage tabPage1;
private void MyTabs()
{
this.tabControl1 = new TabControl();
this.tabPage1 = new TabPage();
this.tabControl1.Controls.Add(tabPage1);
this.tabControl1.Location = new Point(25, 25);
this.tabControl1.Size = new Size(250, 250);
this.tabControl1.ShowToolTips = true;
this.tabPage1.Text = "myTabPage1";
// Creates a string showing the Text value for tabPage1.
// Then assigns the string to ToolTipText.
this.tabPage1.ToolTipText = tabPage1.ToString();
this.ClientSize = new Size(300, 300);
this.Controls.Add(tabControl1);
}
public Form1()
{
MyTabs();
}
static void Main()
{
Application.Run(new Form1());
}
}
Imports System.Drawing
Imports System.Windows.Forms
Public Class Form1
Inherits Form
Private tabControl1 As TabControl
Private tabPage1 As TabPage
Private Sub MyTabs()
Me.tabControl1 = New TabControl()
Me.tabPage1 = New TabPage()
Me.tabControl1.Controls.Add(tabPage1)
Me.tabControl1.Location = New Point(25, 25)
Me.tabControl1.Size = New Size(250, 250)
Me.tabControl1.ShowToolTips = True
Me.tabPage1.Text = "myTabPage1"
' Creates a string showing the Text value for tabPage1.
' Then assigns the string to ToolTipText.
Me.tabPage1.ToolTipText = tabPage1.ToString()
Me.ClientSize = New Size(300, 300)
Me.Controls.Add(tabControl1)
End Sub
Public Sub New()
MyTabs()
End Sub
Shared Sub Main()
Application.Run(New Form1())
End Sub
End Class
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기