RadioButtonRenderer.DrawRadioButton 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다.
오버로드
| Name | Description |
|---|---|
| DrawRadioButton(Graphics, Point, RadioButtonState) |
지정된 상태 및 위치에 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. |
| DrawRadioButton(Graphics, Point, Rectangle, String, Font, Boolean, RadioButtonState) |
지정된 상태 및 위치에 지정된 텍스트와 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. |
| DrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Boolean, RadioButtonState) |
지정된 상태 및 위치에 지정된 텍스트 및 텍스트 서식과 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. |
| DrawRadioButton(Graphics, Point, Rectangle, String, Font, Image, Rectangle, Boolean, RadioButtonState) |
지정된 상태 및 위치에 지정된 텍스트 및 이미지와 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. |
| DrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, RadioButtonState) |
지정된 상태 및 위치에 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. 지정된 텍스트, 텍스트 서식 및 이미지를 사용하여 선택적 포커스 사각형이 있는 경우 |
DrawRadioButton(Graphics, Point, RadioButtonState)
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
지정된 상태 및 위치에 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다.
public:
static void DrawRadioButton(System::Drawing::Graphics ^ g, System::Drawing::Point glyphLocation, System::Windows::Forms::VisualStyles::RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Windows.Forms.VisualStyles.RadioButtonState state);
static member DrawRadioButton : System.Drawing.Graphics * System.Drawing.Point * System.Windows.Forms.VisualStyles.RadioButtonState -> unit
Public Shared Sub DrawRadioButton (g As Graphics, glyphLocation As Point, state As RadioButtonState)
매개 변수
- state
- RadioButtonState
옵션 단추의 RadioButtonState 시각적 상태를 지정하는 값 중 하나입니다.
설명
운영 체제에서 비주얼 스타일을 사용하도록 설정하고 현재 애플리케이션에 비주얼 스타일을 적용하는 경우 이 메서드는 현재 비주얼 스타일을 사용하여 옵션 단추를 그립니다. 그렇지 않으면 이 메서드는 클래식 Windows 스타일을 사용하여 옵션 단추를 그립니다.
적용 대상
DrawRadioButton(Graphics, Point, Rectangle, String, Font, Boolean, RadioButtonState)
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
지정된 상태 및 위치에 지정된 텍스트와 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다.
public:
static void DrawRadioButton(System::Drawing::Graphics ^ g, System::Drawing::Point glyphLocation, System::Drawing::Rectangle textBounds, System::String ^ radioButtonText, System::Drawing::Font ^ font, bool focused, System::Windows::Forms::VisualStyles::RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string? radioButtonText, System.Drawing.Font? font, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
static member DrawRadioButton : System.Drawing.Graphics * System.Drawing.Point * System.Drawing.Rectangle * string * System.Drawing.Font * bool * System.Windows.Forms.VisualStyles.RadioButtonState -> unit
Public Shared Sub DrawRadioButton (g As Graphics, glyphLocation As Point, textBounds As Rectangle, radioButtonText As String, font As Font, focused As Boolean, state As RadioButtonState)
매개 변수
- focused
- Boolean
true포커스 사각형을 그리려면 그렇지 않으면 . false
- state
- RadioButtonState
옵션 단추의 RadioButtonState 시각적 상태를 지정하는 값 중 하나입니다.
예제
다음 코드 예제에서는 사용자 지정 컨트롤의 메서드를 사용 하 여 DrawRadioButton(Graphics, Point, Rectangle, String, Font, Boolean, RadioButtonState) 마우스 포인터의 OnPaint 위치에 의해 결정 된 상태에서 옵션 단추를 그립니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 RadioButtonRenderer 일부입니다.
// Draw the radio button in the current state.
protected:
virtual void OnPaint(PaintEventArgs^ e) override
{
__super::OnPaint(e);
RadioButtonRenderer::DrawRadioButton(e->Graphics,
ClientRectangle.Location, TextRectangle, this->Text,
this->Font, clicked, state);
}
// Draw the radio button in the checked or unchecked state.
protected:
virtual void OnMouseDown(MouseEventArgs^ e) override
{
__super::OnMouseDown(e);
if (!clicked)
{
clicked = true;
this->Text = "Clicked!";
state = RadioButtonState::CheckedPressed;
Invalidate();
}
else
{
clicked = false;
this->Text = "Click here";
state = RadioButtonState::UncheckedNormal;
Invalidate();
}
}
// Draw the radio button in the current state.
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
RadioButtonRenderer.DrawRadioButton(e.Graphics,
ClientRectangle.Location, TextRectangle, this.Text,
this.Font, clicked, state);
}
// Draw the radio button in the checked or unchecked state.
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (!clicked)
{
clicked = true;
this.Text = "Clicked!";
state = RadioButtonState.CheckedPressed;
Invalidate();
}
else
{
clicked = false;
this.Text = "Click here";
state = RadioButtonState.UncheckedNormal;
Invalidate();
}
}
' Draw the radio button in the current state.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
RadioButtonRenderer.DrawRadioButton(e.Graphics, _
Me.ClientRectangle.Location, TextRectangle, Me.Text, _
Me.Font, clicked, state)
End Sub
' Draw the radio button in the checked or unchecked state.
Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
MyBase.OnMouseDown(e)
If Not clicked Then
clicked = True
Me.Text = "Clicked!"
state = RadioButtonState.CheckedPressed
Invalidate()
Else
clicked = False
Me.Text = "Click here"
state = RadioButtonState.UncheckedNormal
Invalidate()
End If
End Sub
설명
운영 체제에서 비주얼 스타일을 사용하도록 설정하고 현재 애플리케이션에 비주얼 스타일을 적용하는 경우 이 메서드는 현재 비주얼 스타일을 사용하여 옵션 단추를 그립니다. 그렇지 않으면 이 메서드는 클래식 Windows 스타일을 사용하여 옵션 단추를 그립니다.
적용 대상
DrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Boolean, RadioButtonState)
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
지정된 상태 및 위치에 지정된 텍스트 및 텍스트 서식과 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다.
public:
static void DrawRadioButton(System::Drawing::Graphics ^ g, System::Drawing::Point glyphLocation, System::Drawing::Rectangle textBounds, System::String ^ radioButtonText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, bool focused, System::Windows::Forms::VisualStyles::RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string? radioButtonText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
static member DrawRadioButton : System.Drawing.Graphics * System.Drawing.Point * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * bool * System.Windows.Forms.VisualStyles.RadioButtonState -> unit
Public Shared Sub DrawRadioButton (g As Graphics, glyphLocation As Point, textBounds As Rectangle, radioButtonText As String, font As Font, flags As TextFormatFlags, focused As Boolean, state As RadioButtonState)
매개 변수
- flags
- TextFormatFlags
값의 비트 조합입니다 TextFormatFlags .
- focused
- Boolean
true포커스 사각형을 그리려면 그렇지 않으면 . false
- state
- RadioButtonState
옵션 단추의 RadioButtonState 시각적 상태를 지정하는 값 중 하나입니다.
설명
운영 체제에서 비주얼 스타일을 사용하도록 설정하고 현재 애플리케이션에 비주얼 스타일을 적용하는 경우 이 메서드는 현재 비주얼 스타일을 사용하여 옵션 단추를 그립니다. 그렇지 않으면 이 메서드는 클래식 Windows 스타일을 사용하여 옵션 단추를 그립니다.
적용 대상
DrawRadioButton(Graphics, Point, Rectangle, String, Font, Image, Rectangle, Boolean, RadioButtonState)
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
지정된 상태 및 위치에 지정된 텍스트 및 이미지와 선택적 포커스 사각형을 사용하여 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다.
public:
static void DrawRadioButton(System::Drawing::Graphics ^ g, System::Drawing::Point glyphLocation, System::Drawing::Rectangle textBounds, System::String ^ radioButtonText, System::Drawing::Font ^ font, System::Drawing::Image ^ image, System::Drawing::Rectangle imageBounds, bool focused, System::Windows::Forms::VisualStyles::RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string? radioButtonText, System.Drawing.Font? font, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
static member DrawRadioButton : System.Drawing.Graphics * System.Drawing.Point * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.RadioButtonState -> unit
Public Shared Sub DrawRadioButton (g As Graphics, glyphLocation As Point, textBounds As Rectangle, radioButtonText As String, font As Font, image As Image, imageBounds As Rectangle, focused As Boolean, state As RadioButtonState)
매개 변수
- focused
- Boolean
true포커스 사각형을 그리려면 그렇지 않으면 . false
- state
- RadioButtonState
옵션 단추의 RadioButtonState 시각적 상태를 지정하는 값 중 하나입니다.
설명
운영 체제에서 비주얼 스타일을 사용하도록 설정하고 현재 애플리케이션에 비주얼 스타일을 적용하는 경우 이 메서드는 현재 비주얼 스타일을 사용하여 옵션 단추를 그립니다. 그렇지 않으면 이 메서드는 클래식 Windows 스타일을 사용하여 옵션 단추를 그립니다.
적용 대상
DrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, RadioButtonState)
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
- Source:
- RadioButtonRenderer.cs
지정된 상태 및 위치에 옵션 단추 컨트롤(라디오 단추라고도 함)을 그립니다. 지정된 텍스트, 텍스트 서식 및 이미지를 사용하여 선택적 포커스 사각형이 있는 경우
public:
static void DrawRadioButton(System::Drawing::Graphics ^ g, System::Drawing::Point glyphLocation, System::Drawing::Rectangle textBounds, System::String ^ radioButtonText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Drawing::Image ^ image, System::Drawing::Rectangle imageBounds, bool focused, System::Windows::Forms::VisualStyles::RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string? radioButtonText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state);
static member DrawRadioButton : System.Drawing.Graphics * System.Drawing.Point * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.RadioButtonState -> unit
Public Shared Sub DrawRadioButton (g As Graphics, glyphLocation As Point, textBounds As Rectangle, radioButtonText As String, font As Font, flags As TextFormatFlags, image As Image, imageBounds As Rectangle, focused As Boolean, state As RadioButtonState)
매개 변수
- flags
- TextFormatFlags
값의 비트 조합입니다 TextFormatFlags .
- focused
- Boolean
true포커스 사각형을 그리려면 그렇지 않으면 . false
- state
- RadioButtonState
옵션 단추의 RadioButtonState 시각적 상태를 지정하는 값 중 하나입니다.
설명
운영 체제에서 비주얼 스타일을 사용하도록 설정하고 현재 애플리케이션에 비주얼 스타일을 적용하는 경우 이 메서드는 현재 비주얼 스타일을 사용하여 옵션 단추를 그립니다. 그렇지 않으면 이 메서드는 클래식 Windows 스타일을 사용하여 옵션 단추를 그립니다.