BoxFrame#
- class BoxFrame[source]#
Bases:
ContainerFrame
Class representing a box with a fix width or height in a report. A box frame can have a border around the whole frame and a colored background. It is a special container frame, because it can only contain one frame. But that frame can be any kind of frame, i.e. it can ba another container frame, so a box can be filled with any content.
- __init__(parent: ContainerFrame, width: float = 0.0, height: float = 0.0, border_extent: float = 0.0, border_color: str = '#000000', background_color: str = '#FFFFFF', keep_together: bool = False, frame_id: str = '')[source]#
Creates a new BoxFrame object. The default values of the params will create an empty box with no border and white background
- Parameters:
parent – Parent frame to which this frame will be added
width – Width of the box in mm or % - float->mm, string->”%”
height – Height of the box in mm or % - float->mm, string->”%”
border_extent – Extent for the borderline
border_color – Color for the borderline
background_color – Background color for the box
keep_together – flag if the box should be kept together on one page (inherited from ReportFrame)
frame_id – frame id (optional)
- property keep_together: bool#
Flag if the frame shall be kept together on one page
- Getter:
Returns the flag
- Setter:
Sets the flag
- property border: Border#
The border of the box frame
- Getter:
Returns the border object
- Setter:
Sets the border
- property width#
The width of the boy
- Getter:
Returns the width
- Setter:
Sets the width
- property height#
The height of the box
- Getter:
Returns the height
- Setter:
Sets the height
- property width_in_percent: bool#
Flag if the width is given in percent or as absolute value in millimeters
- Getter:
Returns the flag
- Setter:
Sets the flag
- property height_in_percent: bool#
Flag if the height is given in percent or as absolute value in millimeters
- Getter:
Returns the flag
- Setter:
Sets the flag
- property padding_top: float#
Padding on top of the box
- Getter:
Returns the top padding
- Setter:
Sets the top padding
- property padding_right: float#
Padding on right of the box
- Getter:
Returns the right padding
- Setter:
Sets the right padding
- property padding_bottom: float#
Padding on bottom of the box
- Getter:
Returns the bottom padding
- Setter:
Sets the bottom padding
- property padding_left: float#
Padding on left of the box
- Getter:
Returns the left padding
- Setter:
Sets the left padding
- property background: str#
Background color of the box
- Getter:
Returns the background color
- Setter:
Sets the background color
- property frame_id: str#
The frame id
- Getter:
Returns the frame id
- Setter:
Sets the frame id
- property h_align: HAlign#
Horizontal alignment of the frame
- Getter:
Returns the horizontal alignment of the frame
- Setter:
Sets the horizontal alignment of the frame
- property margin_bottom: float#
Bottom margin in the frame
- Getter:
Returns the bottom margin
- Setter:
Sets the bottom margin
- property margin_left: float#
Left margin in the frame
- Getter:
Returns the left margin
- Setter:
Sets the left margin
- property margin_right: float#
Right margin in the frame
- Getter:
Returns the right margin
- Setter:
Sets the right margin
- property margin_top: float#
Top margin in the frame
- Getter:
Returns the top margin
- Setter:
Sets the top margin
- property max_height: float#
Maximal height for the frame
- Getter:
Returns the maximal height
- Setter:
Sets the maximal height
- property max_width: float#
Maximal width for the frame
- Getter:
Returns the maximal width
- Setter:
Sets the maximal width
- property parent_frame#
The parent frame
- Getter:
Returns the parent frame
- Setter:
Sets the parent frame
- set_margin(margin: float)#
Sets the margin on all four sides to the given value
- Parameters:
margin – Margin in mm
- property use_full_height: bool#
Flag if the frame shall use the full possible height for the frame
- Getter:
Returns the flag
- Setter:
Sets the flag
- property use_full_width: bool#
Flag if the frame shall use the full possible width for the frame
- Getter:
Returns the flag
- Setter:
Sets the flag