autodrive.formatting.format_rng
¶
Module Contents¶
Classes¶
Contains request generation methods related to formatting a Range’s grid |
|
Contains request generation methods relating to formatting a Range’s |
|
Contains request generation methods methods relating to formatting this |
- class autodrive.formatting.format_rng.RangeCellFormatting(parent)¶
Contains request generation methods related to formatting a Range’s grid (width and height, etc).
- Parameters
parent (Component[Any, Any, Any]) – A Component object.
- add_alternating_row_background(self, colors)¶
Queues a request to add an alternating row background of the indicated color to a Range’s cells.
- Parameters
colors (Color) – The desired Color to apply to every other row.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_background_color(self, color)¶
Queues a request to set the background of the Range’s cells to the indicated color.
- Parameters
color (Color) – The desired Color to set the background to.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_border_format(self, *sides, style=None, color=None)¶
Queues a request to set the border properties of the Range’s cells.
- 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.
sides (autodrive.dtypes.BorderSide) –
- 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_rng.RangeGridFormatting(parent)¶
Contains request generation methods relating to formatting a Range’s cells (like adding borders and backgrounds and such).
- Parameters
parent (Component[Any, Any, Any]) – A Component object.
- auto_column_width(self)¶
Queues a request to set the column width of the Range’s columns equal to the width of the values in the cells.
- 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_rng.RangeTextFormatting(parent)¶
Contains request generation methods methods relating to formatting this Range’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)¶
Queues a request to set the text/number format of the Range’s cells.
- Parameters
format (Format) – A format instance, such as TextFormat or NumberFormat.
- Returns
This formatting object, so further requests can be queued if desired.
- Return type
- set_alignment(self, *aligns)¶
Queues a request to set the horizontal and/or vertical text alignment of the Range’s cells.
- 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.
- 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.