VisualStyleRenderer.GetTextExtent Método

Definición

Devuelve el tamaño y la ubicación de la cadena especificada cuando se dibuja con la fuente del elemento de estilo visual actual.

Sobrecargas

Nombre Description
GetTextExtent(IDeviceContext, String, TextFormatFlags)

Devuelve el tamaño y la ubicación de la cadena especificada cuando se dibuja con la fuente del elemento de estilo visual actual.

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Devuelve el tamaño y la ubicación de la cadena especificada cuando se dibuja con la fuente del elemento de estilo visual actual dentro del rectángulo delimitador inicial especificado.

GetTextExtent(IDeviceContext, String, TextFormatFlags)

Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs

Devuelve el tamaño y la ubicación de la cadena especificada cuando se dibuja con la fuente del elemento de estilo visual actual.

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, textToDraw As String, flags As TextFormatFlags) As Rectangle

Parámetros

dc
IDeviceContext

Esta IDeviceContext operación usará.

textToDraw
String

La cadena que se va a medir.

flags
TextFormatFlags

Combinación bit a bit de los TextFormatFlags valores.

Devoluciones

que Rectangle contiene el área necesaria para ajustarse al texto representado.

Excepciones

dc es null.

Se aplica a

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs
Source:
VisualStyleRenderer.cs

Devuelve el tamaño y la ubicación de la cadena especificada cuando se dibuja con la fuente del elemento de estilo visual actual dentro del rectángulo delimitador inicial especificado.

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, flags As TextFormatFlags) As Rectangle

Parámetros

dc
IDeviceContext

Esta IDeviceContext operación usará.

bounds
Rectangle

que Rectangle se usa para controlar el flujo y el ajuste del texto.

textToDraw
String

La cadena que se va a medir.

flags
TextFormatFlags

Combinación bit a bit de los TextFormatFlags valores.

Devoluciones

que Rectangle contiene el área necesaria para ajustarse al texto representado.

Excepciones

dc es null.

Se aplica a