bosing.GridLength¶
- class bosing.GridLength(value, unit)¶
基类:
objectLength of a grid column.
GridLengthis used to specify the length of a grid column. The length can be specified in seconds, as a fraction of the remaining duration, or automatically.- static auto()¶
Create an automatic grid length.
- 返回:
Automatic grid length.
- 返回类型:
- static convert(obj)¶
Convert the value to GridLength.
The value can be:
GridLength
float: Fixed length in seconds.
'auto': Auto length.
'x*': x stars.
'x': Fixed length in seconds.
'*': 1 star.
- 参数:
obj (GridLength | float | str) -- Value to convert.
- 返回:
Converted value.
- 返回类型:
- 抛出:
ValueError -- If the value cannot be converted.
- static fixed(value)¶
Create a fixed grid length.
- 参数:
value (float) -- Fixed length in seconds.
- 返回:
Fixed grid length.
- 返回类型:
- static star(value)¶
Create a ratio based grid length.
- 参数:
value (float) -- Ratio of the remaining duration.
- 返回:
Ratio based grid length.
- 返回类型:
- unit¶
- value¶