Sets the text style for the assembly layer.
Syntax: |
|---|
|
FWizAssembly.SetTextStyle(textStyle = null) FWizAssembly.SetTextStyle(styleIndex = -1) |
Parameters
| Parameter | Description |
|---|---|
| textStyle | A DlxTextStyle object with the style of the text. |
| styleIndex | Index of the style. There are 10 styles available with indexes from 0 to 9. Specifying -1 sets the default style for the assembly layer. |
Return Value
If an error occurs it returns false otherwise it returns true.
Example
Copy code
|
|
|---|---|
function OnBuildAssembly()
{
var ctx = FWiz.GetAssemblyCtx();
var style = FWiz.GetTextStyle(0);
style.SetStyle("Attribute Text");
ctx.SetTextStyle(style);
ctx.DrawText(new DlxPoint(0,0), "Hello, World.");
}
|
|
