BiFont
This class is used with BiLabel to provide
the font style information.
This class extends
BiObject
and therefore all methods and fields available for
BiObject
are also available for
BiFont
.
Constructor
new
BiFont
(
[
nSize
[
,sName
]
]
)
Parameters
| Name | Type | Optional | Default | Descripton |
nSize |
Number |
![]() |
The font size in pixels | |
sName |
String |
![]() |
The font name |
Properties
Methods
| Name | Description |
paintFont |
Makes the component have a font described by the current font object |
removeFont |
Removes this font from a component. This means that the font styles this font object has applied to a component will be reset/removed. |
Events
None.
Static Methods
| Name | Description |
fromString |
Parses a string and returns a new font object. The format for the
string is "bold"? "italic"? "underline"? "strikeout"? (<size>"px"?)? <font name>? 12px bold italic Arial The order of the parts is not relevant. |
Static Fields
None.
Remarks
To change the font of the component you have to use setFont(). Changing the font object without calling setFont() will not update the component.
Method Details
paintFont
Makes the component have a font described by the current font object
Syntax
object.paintFont
(
oComponent
)
Parameters
| Name | Type | Optional | Default | Descripton |
oComponent |
|
The component to set the font to |
Return Type
void
removeFont
Removes this font from a component. This means that the font styles this font object has applied to a component will be reset/removed.
Syntax
object.removeFont
(
oComponent
)
Parameters
| Name | Type | Optional | Default | Descripton |
oComponent |
|
The component to remove the font from |
Return Type
void
Static Method Details
fromString
Parses a string and returns a new font object. The format for the
string is
"bold"? "italic"? "underline"? "strikeout"? (<size>"px"?)? <font name>?
12px bold italic Arial
The order of the parts is not relevant.
Syntax
BiFont
.
fromString
(
s
)
Parameters
| Name | Type | Optional | Default | Descripton |
s |
String |
The string to parse |
