autodrive.formatting.format_tab
Module Contents
Classes
Contains request generation methods relating to formatting this Tab's cells |
|
Contains request generation methods related to formatting this Tab's grid |
|
Contains request generation methods relating to formatting this Tab's text |
- class autodrive.formatting.format_tab.TabCellFormatting(parent)
Contains request generation methods relating to formatting this Tab’s cells (like adding borders and backgrounds and such).
- Parameters
parent (Component[Any, Any, Any]) – A Component object.
- add_alternating_row_background(colors, rng=None)
Queues a request to add an alternating row background of the indicated color to this Tab’s cells, or to a range within the Tab.
- Parameters
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_background_color(color, rng=None)
Queues a request to set the background of the Tab’s cells (or the specified cells within the Tab) to the indicated color
- Parameters
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_border_format(*sides, style=None, color=None, rng=None)
Queues a request to set the border properties of the Tab’s cells (or the specified cells within the Tab).
- Parameters
*sides – (BorderSide): One or more BorderSide objects, indicating which side(s) of the cells you want to apply the border properties to. If no sides are provided, set_border_format will apply border properties to all sides.
style (BorderStyle, optional) – The style to apply to all the indicated sides. Defaults to None, for the default border style.
color (Color, optional) – The color to set the border(s) to. Defaults to None, for black.
rng (FullRange | str, optional) – Optional range within the Tab to apply the format to, defaults to None, for all cells in the Tab.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- add_request(request)
Adds the passed request to the Formatting object’s parent component.
- Parameters
request (Dict[str, Any]) – An api-ready request.
- Return type
None
- ensure_full_range(rng=None)
Convenience method for ensuring that all requests generated by this Formatting object have a FullRange attached to them, if one isn’t manually supplied.
- class autodrive.formatting.format_tab.TabGridFormatting(parent)
Contains request generation methods related to formatting this Tab’s grid (number of columns, rows, width and height, etc).
- Parameters
parent (Component[Any, Any, Any]) – A Component object.
- auto_column_width(rng=None)
Queues a request to set the column width of the Tab’s columns equal to the width of the values in the cells.
- Parameters
rng (HalfRange, optional) – The range of columns to be affected, defaults to None for all columns in the Tab.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- append_rows(num_rows)
Queues a request to add new empty rows at the bottom of the Tab.
- Parameters
num_rows (int) – The number of rows to add to the bottom of the Tab.
- Returns
- This formatting object, so further requests can be
queued if desired.
- Return type
- insert_rows(num_rows, at_row)
Queues a request to insert new empty rows at the specified row number.
- Parameters
num_rows (int) – The number of rows to insert.
at_row (int) – The row number to insert after.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- delete_rows(rng)
Queues a request to delete rows in the selected row range.
- Parameters
rng (HalfRange) – The range of rows to delete.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- append_columns(num_cols)
Queues a request to add new empty columns at the right of the Tab.
- Parameters
num_cols (int) – The number of columns to add to the right of the Tab.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- insert_columns(num_cols, at_col)
Queues a request to insert new empty columns at the specified column number.
- Parameters
num_cols (int) – The number of columns to insert.
at_col (int) – The column number to insert after.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- delete_columns(rng)
Queues a request to delete columns in the selected column range.
- Parameters
rng (HalfRange) – The range of columns to delete.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- add_request(request)
Adds the passed request to the Formatting object’s parent component.
- Parameters
request (Dict[str, Any]) – An api-ready request.
- Return type
None
- ensure_full_range(rng=None)
Convenience method for ensuring that all requests generated by this Formatting object have a FullRange attached to them, if one isn’t manually supplied.
- class autodrive.formatting.format_tab.TabTextFormatting(parent)
Contains request generation methods relating to formatting this Tab’s text (the text format of any cells, even those containing non-text values like integers or null values).
- Parameters
parent (Component[Any, Any, Any]) – A Component object.
- apply_format(format, rng=None)
Queues a request to set the text/number format of the Tab’s cells (or the specified cells within the Tab).
- Parameters
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_alignment(*aligns, rng=None)
Queues a request to set the horizontal and/or vertical text alignment of the Tab’s cells (or the specified cells within the Tab).
- Parameters
aligns (HorizontalAlign | VerticalAlign) – The desired horizontal and/or vertical alignment properties. Note that if you specify a HorizontalAlign more than once, or a VerticalAlign more than once, only the last of each will be used.
rng (FullRange | str, optional) – Optional range within the Tab to apply the format to, defaults to None, for all cells in the Tab.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- add_request(request)
Adds the passed request to the Formatting object’s parent component.
- Parameters
request (Dict[str, Any]) – An api-ready request.
- Return type
None
- ensure_full_range(rng=None)
Convenience method for ensuring that all requests generated by this Formatting object have a FullRange attached to them, if one isn’t manually supplied.