VisualStyleRenderer.GetTextExtent Metoda

Definice

Vrátí velikost a umístění zadaného řetězce při vykreslení pomocí písma aktuálního prvku vizuálního stylu.

Přetížení

Name Description
GetTextExtent(IDeviceContext, String, TextFormatFlags)

Vrátí velikost a umístění zadaného řetězce při vykreslení pomocí písma aktuálního prvku vizuálního stylu.

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Vrátí velikost a umístění zadaného řetězce při kreslení pomocí písma aktuálního prvku vizuálního stylu v zadaném počátečním ohraničující obdélníku.

GetTextExtent(IDeviceContext, String, TextFormatFlags)

Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs

Vrátí velikost a umístění zadaného řetězce při vykreslení pomocí písma aktuálního prvku vizuálního stylu.

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

Parametry

dc
IDeviceContext

Tato IDeviceContext operace se použije.

textToDraw
String

Řetězec, jehož délku chcete změřit.

flags
TextFormatFlags

Bitové kombinace TextFormatFlags hodnot.

Návraty

A Rectangle , která obsahuje oblast potřebnou pro přizpůsobení vykresleného textu.

Výjimky

dc je null.

Platí pro

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs
Zdroj:
VisualStyleRenderer.cs

Vrátí velikost a umístění zadaného řetězce při kreslení pomocí písma aktuálního prvku vizuálního stylu v zadaném počátečním ohraničující obdélníku.

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

Parametry

dc
IDeviceContext

Tato IDeviceContext operace se použije.

bounds
Rectangle

Slouží Rectangle k řízení toku a obtékání textu.

textToDraw
String

Řetězec, jehož délku chcete změřit.

flags
TextFormatFlags

Bitové kombinace TextFormatFlags hodnot.

Návraty

A Rectangle , která obsahuje oblast potřebnou pro přizpůsobení vykresleného textu.

Výjimky

dc je null.

Platí pro