Style defines display attributes of the text. Class TSyntaxFormat is an implementation of the style.
Style attributes |
In TSyntaxFormat |
Description |
Vertical alignment |
Vertical alignment in th line (top, center, bottom) | |
Background |
Background color (if it isn't equal None) | |
Font color |
Font.Color |
Font color (if it is't equal None) |
Font styles |
Font.Style |
Font style |
Font |
Font (name, color, style, character set) | |
Hidden |
Specifies that text is hidden (invisible) | |
Read only |
Specifies that text is read-only | |
Capitalization effect |
Specifies changing case operation before drawing |
Style can be partially applied to the editor canvas. Property FormatType: TFormatType specifies attributes that will be selected in canvas.
TFormatType values:
Style type |
In TSyntaxFormat |
Description |
Only background |
ftBackGround |
Only background color will affect |
Back- and fore-ground |
ftColor |
Background and foreground (font) colors will affect |
Font style & colors |
ftFontAttr |
Colors, font attributes (TFontStyles), vertical alignment will affect |
Custom font |
ftCustomFont |
All properties of style will affect |
If value of the background or foreground color is equal to clNone ($FF000000) this color will be skipped.
To define custom font you must select "Custom font" style type.
When style is applied to line highlighting, only background and foreground colors are used.
When style is applied to draw line separator, only background color is used.
Border styles
Border style is independent on font and back ground style. It is used to draw border around rectangle of the text that has this style. For example, if style of the token has border style, token will be displayed with the border around it.
You may separately specify border style and color of all edges of the border.
Edge |
Line type property |
Line color property |
left |
BorderTypeLeft |
BorderColorLeft |
top |
BorderTypeTop |
BorderColorTop |
right |
BorderTypeRight |
BorderColorRight |
bottom |
BorderTypeBottom |
BorderColorBottom |
Border line type is specified by means of TBorderLineType.
If text region with a border is multi-line, there is two way to display border:
Second way requires more time, but it is very useful if you want solid border around multi-line text region.
Copyright (c) 2004-2011. All rights reserved.
|
What do you think about this topic? Send feedback!
|