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
Inheritance diagram for class
CaptionBarStyle:
Methods Summary
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 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.
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.
-
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.
-
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.
-
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.
-
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.
-
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.Colour
object.
Note
If this is not set, the colour property is undefined and will not be used.
Use CaptionColourUsed
to check if this style is used.
-
SetCaptionFont
(self, font)
Sets font for the caption bar.
- Parameters:
font – a valid wx.Font
object.
Note
If this is not set, the font property is undefined and will not be used.
Use CaptionFontUsed
to 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_V
|
1 |
Draws a vertical gradient from top to bottom |
CAPTIONBAR_GRADIENT_H
|
2 |
Draws a horizontal gradient from left to right |
CAPTIONBAR_SINGLE
|
3 |
Draws a single filled rectangle to draw the caption |
CAPTIONBAR_RECTANGLE
|
4 |
Draws a single colour with a rectangle around the caption |
CAPTIONBAR_FILLED_RECTANGLE
|
5 |
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 CaptionStyleUsed
to check if this style is used.
-
SetFirstColour
(self, colour)
Sets first colour for the caption bar.
- Parameters:
colour – a valid wx.Colour
object.
Note
If this is not set, the colour property is undefined and will not be used.
Use FirstColourUsed
to check if this style is used.
-
SetSecondColour
(self, colour)
Sets second colour for the caption bar.
- Parameters:
colour – a valid wx.Colour
object.
Note
If this is not set, the colour property is undefined and will not be used.
Use SecondColourUsed
to check if this style is used.