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(self, 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
- add_request(self, 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(self, 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(self, 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(self, 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(self, 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(self, 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
- add_request(self, 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(self, 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(self, format, rng=None)¶
Queues a request to set the text/number format of the Range’s cells.
- Parameters
- Returns
- This formatting object, so further requests can be
queued if desired.
- Return type
- add_request(self, 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(self, 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.