"italic"
The attribute "italic"; sets the font (of a textEdit) italic (beginning from the cursor position). The attribute also returns TRUE if the current font is italic.
Synopsis
setValue(string shape, "italic", bool fontType);
getValue(string shape, "italic", bool &fontType);
this.italic(bool fontType);
Parameter
Parameter | Description |
---|---|
shape | Name of the object |
fontType |
TRUE = the font is italic FALSE = the font is not italic |
Description
The attribute "italic"; sets the font italic (beginning from the cursor position). The attribute also returns TRUE if the current font is italic.
Example
The following code sets the font Arial and returns TRUE if the current font is italic.
main(bool enter)
{
this.Text("Test");
langString c = "Arial,8,-1,5,50,0,0,0,0,0";
/*Set the font arial*/
string objT = "TEXT_EDIT1";
setValue(objT,"font",c);
bool f;
getValue(objT,"italic",f);
//Is the current font italic?
DebugN("Is the font italic", f);
}
Add also the code TEXT_EDIT1.italic = true to an eventClick of a button. If you write a text and then press the button, the font is set to italic (beginning from the cursor position).
Assignment
TextEdit