wx.lib.agw.foldpanelbar.CaptionBarStyle¶
This class encapsulates the styles you wish to set for the
CaptionBar (this is the part of the FoldPanel where the caption
is displayed). It can either be applied at creation time be
reapplied when styles need to be changed.
At construction time, all styles are set to their default
transparency. This means none of the styles will be applied to
the CaptionBar in question, meaning it will be created using the
default internals. When setting i.e the colour, font or panel
style, these styles become active to be used.
Class Hierarchy¶
Methods Summary¶
Default constructor for this class. |
|
Checks if the caption colour of the caption bar is set. |
|
Checks if the caption bar font is set. |
|
Checks if the caption style of the caption bar is set. |
|
Checks if the first colour of the caption bar is set. |
|
Returns the caption colour for the caption bar. |
|
Returns the font for the caption bar. |
|
Returns the caption style for the caption bar. |
|
Returns the first colour for the caption bar. |
|
Returns the second colour for the caption bar. |
|
Resets default |
|
Checks if the second colour of the caption bar is set. |
|
Sets caption colour for the caption bar. |
|
Sets font for the caption bar. |
|
Sets caption style for the caption bar. |
|
Sets first colour for the caption bar. |
|
Sets second colour for the caption bar. |
Class API¶
- class CaptionBarStyle(object)¶
This class encapsulates the styles you wish to set for the
CaptionBar(this is the part of the FoldPanel where the caption is displayed). It can either be applied at creation time be reapplied when styles need to be changed.At construction time, all styles are set to their default transparency. This means none of the styles will be applied to the
CaptionBarin question, meaning it will be created using the default internals. When setting i.e the colour, font or panel style, these styles become active to be used.
Methods¶
- __init__(self)¶
Default constructor for this class.
- CaptionColourUsed(self)¶
Checks if the caption colour of the caption bar is set.
- CaptionFontUsed(self)¶
Checks if the caption bar font is set.
- CaptionStyleUsed(self)¶
Checks if the caption style of the caption bar is set.
- FirstColourUsed(self)¶
Checks if the first colour of the caption bar is set.
- GetCaptionColour(self)¶
Returns the caption colour for the caption bar.
Note
Please be warned this will result in an assertion failure when this property is not previously set.
See also
- GetCaptionFont(self)¶
Returns the font for the caption bar.
Note
Please be warned this will result in an assertion failure when this property is not previously set.
See also
- GetCaptionStyle(self)¶
Returns the caption style for the caption bar.
Note
Please be warned this will result in an assertion failure when this property is not previously set.
See also
- GetFirstColour(self)¶
Returns the first colour for the caption bar.
Note
Please be warned this will result in an assertion failure when this property is not previously set.
See also
- GetSecondColour(self)¶
Returns the second colour for the caption bar.
Note
Please be warned this will result in an assertion failure when this property is not previously set.
See also
- ResetDefaults(self)¶
Resets default
CaptionBarStyle.
- SecondColourUsed(self)¶
Checks if the second colour of the caption bar is set.
- SetCaptionColour(self, colour)¶
Sets caption colour for the caption bar.
- Parameters:
colour – a valid
wx.Colourobject.
Note
If this is not set, the colour property is undefined and will not be used. Use
CaptionColourUsedto check if this style is used.
- SetCaptionFont(self, font)¶
Sets font for the caption bar.
- Parameters:
font – a valid
wx.Fontobject.
Note
If this is not set, the font property is undefined and will not be used. Use
CaptionFontUsedto check if this style is used.
- SetCaptionStyle(self, style)¶
Sets caption style for the caption bar.
- Parameters:
style – can be one of the following bits:
Caption Style
Value
Description
CAPTIONBAR_GRADIENT_V1
Draws a vertical gradient from top to bottom
CAPTIONBAR_GRADIENT_H2
Draws a horizontal gradient from left to right
CAPTIONBAR_SINGLE3
Draws a single filled rectangle to draw the caption
CAPTIONBAR_RECTANGLE4
Draws a single colour with a rectangle around the caption
CAPTIONBAR_FILLED_RECTANGLE5
Draws a filled rectangle and a border around it
Note
If this is not set, the property is undefined and will not be used. Use
CaptionStyleUsedto check if this style is used.
- SetFirstColour(self, colour)¶
Sets first colour for the caption bar.
- Parameters:
colour – a valid
wx.Colourobject.
Note
If this is not set, the colour property is undefined and will not be used. Use
FirstColourUsedto check if this style is used.
- SetSecondColour(self, colour)¶
Sets second colour for the caption bar.
- Parameters:
colour – a valid
wx.Colourobject.
Note
If this is not set, the colour property is undefined and will not be used. Use
SecondColourUsedto check if this style is used.