wx.TextAttr represents the character and paragraph attributes, or style, for a range of text in a wx.TextCtrl or wx.richtext.RichTextCtrl.
Unless explicitly mentioned, the attributes are only implemented in wx.richtext.RichTextCtrl, and not wx.TextCtrl.
When setting up a wx.TextAttr object, pass a bitlist mask to wx.TextAttr.SetFlags
to indicate which style elements should be changed. As a convenience, when you call a setter such as SetFont, the relevant bit will be set.
See also
wx.TextCtrl, wx.richtext.RichTextCtrl
Constructors. |
|
Applies the attributes in style to the original object, but not those attributes from style that are the same as those in compareWith (if passed). |
|
Partial equality test. |
|
Returns the alignment flags. |
|
Returns the background colour. |
|
Returns a string containing the name of the font associated with the bullet symbol. |
|
Returns the standard bullet name, applicable if the bullet style is |
|
Returns the bullet number. |
|
Returns the bullet style. |
|
Returns the bullet text, which could be a symbol, or (for example) cached outline text. |
|
Returns the name of the character style. |
|
Returns flags indicating which attributes are applicable. |
|
Creates and returns a font specified by the font attributes in the wx.TextAttr object. |
|
Gets the font attributes from the given font, using only the attributes specified by flags. |
|
Returns the font encoding. |
|
Returns the font face name. |
|
Returns the font family. |
|
Returns the font size in points. |
|
Returns the font style. |
|
Returns |
|
Returns the font weight. |
|
Returns the left indent in tenths of a millimetre. |
|
Returns the left sub-indent in tenths of a millimetre. |
|
Returns the line spacing value, one of wx.TextAttrLineSpacing values. |
|
Returns the name of the list style. |
|
Returns the outline level. |
|
Returns the space in tenths of a millimeter after the paragraph. |
|
Returns the space in tenths of a millimeter before the paragraph. |
|
Returns the name of the paragraph style. |
|
Returns the right indent in tenths of a millimeter. |
|
Returns an array of tab stops, each expressed in tenths of a millimeter. |
|
Returns the text foreground colour. |
|
Returns the text effect bits of interest. |
|
Returns the text effects, a bit list of styles. |
|
Returns the URL for the content. |
|
Returns the underline color used. |
|
Returns the underline type, which is one of the TextAttrUnderlineType values. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Copies all defined/valid properties from overlay to current object. |
|
Sets the paragraph alignment. |
|
Sets the background colour. |
|
Sets the name of the font associated with the bullet symbol. |
|
Sets the standard bullet name, applicable if the bullet style is |
|
Sets the bullet number. |
|
Sets the bullet style. |
|
Sets the bullet text, which could be a symbol, or (for example) cached outline text. |
|
Sets the character style name. |
|
Sets the flags determining which styles are being specified. |
|
Sets the attributes for the given font. |
|
Sets the font encoding. |
|
Sets the font face name. |
|
Sets the font family. |
|
Sets the font size in pixels. |
|
Sets the font size in points. |
|
Sets the font size in points. |
|
Sets the font style (normal, italic or slanted). |
|
Sets the font underlining (solid line, text colour). |
|
Sets the font underlining. |
|
Sets the font weight. |
|
Sets the left indent and left subindent in tenths of a millimetre. |
|
Sets the line spacing. |
|
Sets the list style name. |
|
Specifies the outline level. |
|
Specifies a page break before this paragraph. |
|
Sets the spacing after a paragraph, in tenths of a millimetre. |
|
Sets the spacing before a paragraph, in tenths of a millimetre. |
|
Sets the name of the paragraph style. |
|
Sets the right indent in tenths of a millimetre. |
|
Sets the tab stops, expressed in tenths of a millimetre. |
|
Sets the text foreground colour. |
|
Sets the text effect bits of interest. |
|
Sets the text effects, a bit list of styles. |
|
Sets the URL for the content. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.
TextAttr
(object)¶Possible constructors:
TextAttr()
TextAttr(colText, colBack=NullColour, font=NullFont,
alignment=TEXT_ALIGNMENT_DEFAULT)
TextAttr(attr)
TextAttr represents the character and paragraph attributes, or style, for a range of text in a TextCtrl or RichTextCtrl.
__init__
(self, *args, **kw)¶Constructors.
__init__ (self)
__init__ (self, colText, colBack=NullColour, font=NullFont, alignment=TEXT_ALIGNMENT_DEFAULT)
colText (wx.Colour) –
colBack (wx.Colour) –
font (wx.Font) –
alignment (TextAttrAlignment) –
__init__ (self, attr)
attr (wx.TextAttr) –
Apply
(self, style, compareWith=None)¶Applies the attributes in style to the original object, but not those attributes from style that are the same as those in compareWith (if passed).
style (wx.TextAttr) –
compareWith (wx.TextAttr) –
bool
EqPartial
(self, attr, weakTest=True)¶Partial equality test.
If weakTest is True
, attributes of this object do not have to be present if those attributes of attr
are present. If weakTest is False
, the function will fail if an attribute is present in attr
but not in this object.
attr (wx.TextAttr) –
weakTest (bool) –
bool
GetAlignment
(self)¶Returns the alignment flags.
See wx.TextAttrAlignment for a list of available styles.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
GetBackgroundColour
(self)¶Returns the background colour.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
GetBulletFont
(self)¶Returns a string containing the name of the font associated with the bullet symbol.
Only valid for attributes with TEXT_ATTR_BULLET_SYMBOL
.
string
GetBulletName
(self)¶Returns the standard bullet name, applicable if the bullet style is wx.TEXT_ATTR_BULLET_STYLE_STANDARD
.
Currently the following standard bullet names are supported:
standard/circle
standard/square
standard/diamond
standard/triangle
string
Note
For wx.richtext.RichTextCtrl users only: if you wish your rich text controls to support further bullet graphics, you can derive a class from wx.richtext.RichTextRenderer or wx.richtext.RichTextStdRenderer, override DrawStandardBullet
and EnumerateStandardBulletNames
, and set an instance of the class using wx.richtext.RichTextBuffer.SetRenderer
.
GetBulletNumber
(self)¶Returns the bullet number.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
int
GetBulletStyle
(self)¶Returns the bullet style.
See wx.TextAttrBulletStyle for a list of available styles.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
int
GetBulletText
(self)¶Returns the bullet text, which could be a symbol, or (for example) cached outline text.
string
GetCharacterStyleName
(self)¶Returns the name of the character style.
string
GetFlags
(self)¶Returns flags indicating which attributes are applicable.
See SetFlags
for a list of available flags.
long
GetFont
(self)¶Creates and returns a font specified by the font attributes in the wx.TextAttr object.
Note that wx.TextAttr does not store a wx.Font object, so this is only a temporary font.
For greater efficiency, access the font attributes directly.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
GetFontAttributes
(self, font, flags=TEXT_ATTR_FONT)¶Gets the font attributes from the given font, using only the attributes specified by flags.
font (wx.Font) –
flags (int) –
bool
GetFontEncoding
(self)¶Returns the font encoding.
GetFontFaceName
(self)¶Returns the font face name.
string
GetFontFamily
(self)¶Returns the font family.
GetFontSize
(self)¶Returns the font size in points.
int
GetFontStyle
(self)¶Returns the font style.
GetFontUnderlined
(self)¶Returns True
if the font is underlined.
bool
GetFontWeight
(self)¶Returns the font weight.
GetLeftIndent
(self)¶Returns the left indent in tenths of a millimetre.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
long
GetLeftSubIndent
(self)¶Returns the left sub-indent in tenths of a millimetre.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
long
GetLineSpacing
(self)¶Returns the line spacing value, one of wx.TextAttrLineSpacing values.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
int
GetListStyleName
(self)¶Returns the name of the list style.
string
GetOutlineLevel
(self)¶Returns the outline level.
int
GetParagraphSpacingAfter
(self)¶Returns the space in tenths of a millimeter after the paragraph.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
int
GetParagraphSpacingBefore
(self)¶Returns the space in tenths of a millimeter before the paragraph.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
int
GetParagraphStyleName
(self)¶Returns the name of the paragraph style.
string
GetRightIndent
(self)¶Returns the right indent in tenths of a millimeter.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
long
GetTabs
(self)¶Returns an array of tab stops, each expressed in tenths of a millimeter.
Each stop is measured from the left margin and therefore each value must be larger than the last.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
list of integers
GetTextColour
(self)¶Returns the text foreground colour.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
GetTextEffectFlags
(self)¶Returns the text effect bits of interest.
See SetFlags
for further information.
int
GetTextEffects
(self)¶Returns the text effects, a bit list of styles.
See SetTextEffects
for details.
int
GetURL
(self)¶Returns the URL for the content.
Content with wx.TEXT_ATTR_URL
style causes wx.richtext.RichTextCtrl to show a hand cursor over it, and wx.richtext.RichTextCtrl generates a wx.TextUrlEvent when the content is clicked.
string
GetUnderlineColour
(self)¶Returns the underline color used.
NullColour when the text colour is used.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
New in version 4.1/wxWidgets-3.1.3.
GetUnderlineType
(self)¶Returns the underline type, which is one of the TextAttrUnderlineType values.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
New in version 4.1/wxWidgets-3.1.3.
HasAlignment
(self)¶Returns True
if the attribute object specifies alignment.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasBackgroundColour
(self)¶Returns True
if the attribute object specifies a background colour.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasBulletName
(self)¶Returns True
if the attribute object specifies a standard bullet name.
bool
HasBulletNumber
(self)¶Returns True
if the attribute object specifies a bullet number.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
bool
HasBulletStyle
(self)¶Returns True
if the attribute object specifies a bullet style.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
bool
HasBulletText
(self)¶Returns True
if the attribute object specifies bullet text (usually specifying a symbol).
bool
HasCharacterStyleName
(self)¶Returns True
if the attribute object specifies a character style name.
bool
HasFlag
(self, flag)¶Returns True
if the flag is present in the attribute object’s flag bitlist.
flag (long) –
bool
HasFont
(self)¶Returns True
if the attribute object specifies any font attributes.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasFontEncoding
(self)¶Returns True
if the attribute object specifies an encoding.
bool
HasFontFaceName
(self)¶Returns True
if the attribute object specifies a font face name.
bool
HasFontFamily
(self)¶Returns True
if the attribute object specifies a font family.
bool
HasFontItalic
(self)¶Returns True
if the attribute object specifies italic style.
bool
HasFontPixelSize
(self)¶Returns True
if the attribute object specifies a font pixel size.
bool
HasFontPointSize
(self)¶Returns True
if the attribute object specifies a font point size.
bool
HasFontSize
(self)¶Returns True
if the attribute object specifies a font point or pixel size.
bool
HasFontUnderlined
(self)¶Returns True
if the attribute object specifies either underlining or no underlining.
bool
HasFontWeight
(self)¶Returns True
if the attribute object specifies font weight (bold, light or normal).
bool
HasLeftIndent
(self)¶Returns True
if the attribute object specifies a left indent.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasLineSpacing
(self)¶Returns True
if the attribute object specifies line spacing.
For wx.TextCtrl, is implemented under wxMSW and wxOSX. Also implemented in wx.richtext.RichTextCtrl.
bool
HasListStyleName
(self)¶Returns True
if the attribute object specifies a list style name.
bool
HasOutlineLevel
(self)¶Returns True
if the attribute object specifies an outline level.
bool
HasPageBreak
(self)¶Returns True
if the attribute object specifies a page break before this paragraph.
bool
HasParagraphSpacingAfter
(self)¶Returns True
if the attribute object specifies spacing after a paragraph.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
bool
HasParagraphSpacingBefore
(self)¶Returns True
if the attribute object specifies spacing before a paragraph.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasParagraphStyleName
(self)¶Returns True
if the attribute object specifies a paragraph style name.
bool
HasRightIndent
(self)¶Returns True
if the attribute object specifies a right indent.
bool
HasTabs
(self)¶Returns True
if the attribute object specifies tab stops.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasTextColour
(self)¶Returns True
if the attribute object specifies a text foreground colour.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
bool
HasTextEffects
(self)¶Returns True
if the attribute object specifies text effects.
bool
HasURL
(self)¶Returns True
if the attribute object specifies a URL.
bool
IsCharacterStyle
(self)¶Returns True
if the object represents a character style, that is, the flags specify a font or a text background or foreground colour.
bool
IsDefault
(self)¶Returns False
if we have any attributes set, True
otherwise.
bool
IsParagraphStyle
(self)¶Returns True
if the object represents a paragraph style, that is, the flags specify alignment, indentation, tabs, paragraph spacing, or bullet style.
bool
Merge
(self, *args, **kw)¶Merge (self, overlay)
Copies all defined/valid properties from overlay to current object.
overlay (wx.TextAttr) –
Merge (base, overlay)
Creates a new wx.TextAttr which is a merge of base and overlay.
Properties defined in overlay take precedence over those in base. Properties undefined/invalid in both are undefined in the result.
base (wx.TextAttr) –
overlay (wx.TextAttr) –
SetAlignment
(self, alignment)¶Sets the paragraph alignment.
See wx.TextAttrAlignment enumeration values.
wx.TEXT_ALIGNMENT_JUSTIFIED
is not implemented for wx.richtext.RichTextCtrl. In the future, wx.richtext.RichTextCtrl justification may be supported when printing or previewing only.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
alignment (TextAttrAlignment) –
SetBackgroundColour
(self, colBack)¶Sets the background colour.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
colBack (wx.Colour) –
SetBulletFont
(self, font)¶Sets the name of the font associated with the bullet symbol.
Only valid for attributes with TEXT_ATTR_BULLET_SYMBOL
.
font (string) –
SetBulletName
(self, name)¶Sets the standard bullet name, applicable if the bullet style is wx.TEXT_ATTR_BULLET_STYLE_STANDARD
.
See GetBulletName
for a list of supported names, and how to expand the range of supported types.
name (string) –
SetBulletNumber
(self, n)¶Sets the bullet number.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
n (int) –
SetBulletStyle
(self, style)¶Sets the bullet style.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
For wx.richtext.RichTextCtrl, the wx.TextAttrBulletStyle enumeration values are all supported, except for wx.TEXT_ATTR_BULLET_STYLE_BITMAP
.
For wx.TextCtrl under wxMSW, the wx.TextAttrBulletStyle enumeration values are all supported, except for wx.TEXT_ATTR_BULLET_STYLE_BITMAP
, wx.TEXT_ATTR_BULLET_STYLE_OUTLINE
, wx.TEXT_ATTR_BULLET_STYLE_ALIGN_LEFT
, wx.TEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT
, wx.TEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE
, and wx.TEXT_ATTR_BULLET_STYLE_CONTINUATION
.
style (int) –
SetBulletText
(self, text)¶Sets the bullet text, which could be a symbol, or (for example) cached outline text.
text (string) –
SetCharacterStyleName
(self, name)¶Sets the character style name.
name (string) –
SetFlags
(self, flags)¶Sets the flags determining which styles are being specified.
The wx.TextAttrFlags values can be passed in a bitlist.
flags (long) –
SetFont
(self, font, flags=TEXT_ATTR_FONT & ~TEXT_ATTR_FONT_PIXEL_SIZE)¶Sets the attributes for the given font.
Note that wx.TextAttr does not store an actual wx.Font object.
For wx.TextCtrl, is implemented under wxMSW, wxOSX and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
font (wx.Font) –
flags (int) –
SetFontEncoding
(self, encoding)¶Sets the font encoding.
encoding (FontEncoding) –
SetFontFaceName
(self, faceName)¶Sets the font face name.
faceName (string) –
SetFontFamily
(self, family)¶Sets the font family.
family (FontFamily) –
SetFontPixelSize
(self, pixelSize)¶Sets the font size in pixels.
pixelSize (int) –
SetFontPointSize
(self, pointSize)¶Sets the font size in points.
pointSize (int) –
SetFontSize
(self, pointSize)¶Sets the font size in points.
pointSize (int) –
SetFontStyle
(self, fontStyle)¶Sets the font style (normal, italic or slanted).
fontStyle (FontStyle) –
SetFontUnderlined
(self, underlined)¶Sets the font underlining (solid line, text colour).
underlined (bool) –
SetFontUnderlineType
(self, type, colour=NullColour)¶Sets the font underlining.
type (TextAttrUnderlineType) – Type of underline.
colour (wx.Colour) – Colour to use for underlining, text colour is used by default.
New in version 4.1/wxWidgets-3.1.3.
Note
On wxMSW, wx.TEXT_ATTR_UNDERLINE_DOUBLE
is shown as wx.TEXT_ATTR_UNDERLINE_SOLID
. There is only a limited number of colours supported, the RGB
values are listed here. wx.TEXT_ATTR_UNDERLINE_SPECIAL
is shown as a waved line.
Note
On wxGTK, underline colour is only supported by GTK3
. wx.TEXT_ATTR_UNDERLINE_SPECIAL
is shown as a waved line. GTK might overrule the colour of wx.TEXT_ATTR_UNDERLINE_SPECIAL
.
Note
On wxOSX, wx.TEXT_ATTR_UNDERLINE_SPECIAL
is shown as a dotted line.
SetFontWeight
(self, fontWeight)¶Sets the font weight.
fontWeight (FontWeight) –
SetLeftIndent
(self, indent, subIndent=0)¶Sets the left indent and left subindent in tenths of a millimetre.
The sub-indent is an offset from the left of the paragraph, and is used for all but the first line in a paragraph.
A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented relative to the subsequent lines.
wx.richtext.RichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
indent (int) –
subIndent (int) –
SetLineSpacing
(self, spacing)¶Sets the line spacing.
spacing is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means float spacing. The wx.TextAttrLineSpacing values are defined for convenience.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
spacing (int) –
SetListStyleName
(self, name)¶Sets the list style name.
name (string) –
SetOutlineLevel
(self, level)¶Specifies the outline level.
Zero represents normal text. At present, the outline level is not used, but may be used in future for determining list levels and for applications that need to store document structure information.
level (int) –
SetPageBreak
(self, pageBreak=True)¶Specifies a page break before this paragraph.
pageBreak (bool) –
SetParagraphSpacingAfter
(self, spacing)¶Sets the spacing after a paragraph, in tenths of a millimetre.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
spacing (int) –
SetParagraphSpacingBefore
(self, spacing)¶Sets the spacing before a paragraph, in tenths of a millimetre.
For wx.TextCtrl, is implemented under wxMSW. Also implemented in wx.richtext.RichTextCtrl.
spacing (int) –
SetParagraphStyleName
(self, name)¶Sets the name of the paragraph style.
name (string) –
SetRightIndent
(self, indent)¶Sets the right indent in tenths of a millimetre.
indent (int) –
SetTabs
(self, tabs)¶Sets the tab stops, expressed in tenths of a millimetre.
Each stop is measured from the left margin and therefore each value must be larger than the last.
For wx.TextCtrl, is implemented under wxMSW and wxGTK. Also implemented in wx.richtext.RichTextCtrl.
tabs (list of integers) –
SetTextEffectFlags
(self, flags)¶Sets the text effect bits of interest.
You should also pass wx.TEXT_ATTR_EFFECTS
to SetFlags
. See SetFlags
for further information.
flags (int) –
SetTextEffects
(self, effects)¶Sets the text effects, a bit list of styles.
The wx.TextAttrEffects enumeration values can be used.
Of these, only wx.TEXT_ATTR_EFFECT_CAPITALS
, wx.TEXT_ATTR_EFFECT_STRIKETHROUGH
, wx.TEXT_ATTR_EFFECT_SUPERSCRIPT
and wx.TEXT_ATTR_EFFECT_SUBSCRIPT
are implemented.
wx.TEXT_ATTR_EFFECT_CAPITALS
capitalises text when displayed (leaving the case of the actual buffer text unchanged), and wx.TEXT_ATTR_EFFECT_STRIKETHROUGH
draws a line through text.
To set effects, you should also pass wx.TEXT_ATTR_EFFECTS
to SetFlags
, and call SetTextEffectFlags
with the styles (taken from the above set) that you are interested in setting.
effects (int) –
SetURL
(self, url)¶Sets the URL for the content.
Sets the wx.TEXT_ATTR_URL
style; content with this style causes wx.richtext.RichTextCtrl to show a hand cursor over it, and wx.richtext.RichTextCtrl generates a wx.TextUrlEvent when the content is clicked.
url (string) –
Alignment
¶See GetAlignment
and SetAlignment
BackgroundColour
¶BulletFont
¶See GetBulletFont
and SetBulletFont
BulletName
¶See GetBulletName
and SetBulletName
BulletNumber
¶See GetBulletNumber
and SetBulletNumber
BulletStyle
¶See GetBulletStyle
and SetBulletStyle
BulletText
¶See GetBulletText
and SetBulletText
CharacterStyleName
¶FontEncoding
¶See GetFontEncoding
and SetFontEncoding
FontFaceName
¶See GetFontFaceName
and SetFontFaceName
FontFamily
¶See GetFontFamily
and SetFontFamily
FontSize
¶See GetFontSize
and SetFontSize
FontStyle
¶See GetFontStyle
and SetFontStyle
FontUnderlined
¶See GetFontUnderlined
and SetFontUnderlined
FontWeight
¶See GetFontWeight
and SetFontWeight
LeftIndent
¶See GetLeftIndent
and SetLeftIndent
LeftSubIndent
¶See GetLeftSubIndent
LineSpacing
¶See GetLineSpacing
and SetLineSpacing
ListStyleName
¶See GetListStyleName
and SetListStyleName
OutlineLevel
¶See GetOutlineLevel
and SetOutlineLevel
ParagraphSpacingAfter
¶ParagraphSpacingBefore
¶ParagraphStyleName
¶RightIndent
¶See GetRightIndent
and SetRightIndent
TextColour
¶See GetTextColour
and SetTextColour
TextEffectFlags
¶See GetTextEffectFlags
and SetTextEffectFlags
TextEffects
¶See GetTextEffects
and SetTextEffects
UnderlineColour
¶UnderlineType
¶See GetUnderlineType