![]() |
VOOZH | about |
In this article, we are going to learn how can we get different attributes of StaticText like background, foreground colors, and fonts. We use GetClassDefaultAttributes() function to get an object of wx.VisualAttributes. It may or may not take variant as an argument.
Syntax:
wx.StaticText.GetClassDefaultAttributes()
or
wx.StaticText.GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)Parameters:
Parameter Input Type Description variant WindowVariant variant for static text. Return Type:
wx.VisualAttributes
Code Example:
Console Output:
(240, 240, 240, 255)
(0, 0, 0, 255)
Output Window:
👁 Image