Spread Windows Forms 6.0 Product Documentation
GetRotatedTextSize(Graphics,String,Font,Rectangle,TextOrientation,Boolean,HotkeyPrefix,StringTrimming) Method
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > ElementWindowless Class > GetRotatedTextSize Method : GetRotatedTextSize(Graphics,String,Font,Rectangle,TextOrientation,Boolean,HotkeyPrefix,StringTrimming) Method


g
GDI+ graphics surface
s
String
font
Font
r
Rectangle
textOrientation
Text orientation
wordWrap
True to wrap text, false otherwise.
hotkeyPrefix
HotkeyPrefix
stringTrim
StringTrimming

Glossary Item Box

Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function GetRotatedTextSize( _
   ByVal g As Graphics, _
   ByVal s As String, _
   ByVal font As Font, _
   ByVal r As Rectangle, _
   ByVal textOrientation As TextOrientation, _
   ByVal wordWrap As Boolean, _
   ByVal hotkeyPrefix As HotkeyPrefix, _
   ByVal stringTrim As StringTrimming _
) As Size
Visual Basic (Usage)Copy Code
Dim g As Graphics
Dim s As String
Dim font As Font
Dim r As Rectangle
Dim textOrientation As TextOrientation
Dim wordWrap As Boolean
Dim hotkeyPrefix As HotkeyPrefix
Dim stringTrim As StringTrimming
Dim value As Size
 
value = ElementWindowless.GetRotatedTextSize(g, s, font, r, textOrientation, wordWrap, hotkeyPrefix, stringTrim)
C# 
public static Size GetRotatedTextSize( 
   Graphics g,
   string s,
   Font font,
   Rectangle r,
   TextOrientation textOrientation,
   bool wordWrap,
   HotkeyPrefix hotkeyPrefix,
   StringTrimming stringTrim
)

Parameters

g
GDI+ graphics surface
s
String
font
Font
r
Rectangle
textOrientation
Text orientation
wordWrap
True to wrap text, false otherwise.
hotkeyPrefix
HotkeyPrefix
stringTrim
StringTrimming

Return Value

Size object containing the size of the text

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.