File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,22 @@ def __repr__(self) -> str:
97
97
98
98
@property
99
99
def row (self ) -> int | None :
100
+ """Gets or sets the row position of this item within its parent view.
101
+
102
+ The row position determines the vertical placement of the item in the UI.
103
+ The value must be an integer between 0 and 4 (inclusive), or ``None`` to indicate
104
+ that no specific row is set.
105
+
106
+ Returns
107
+ -------
108
+ Optional[:class:`int`]
109
+ The row position of the item, or ``None`` if not explicitly set.
110
+
111
+ Raises
112
+ ------
113
+ ValueError
114
+ If the row value is not ``None`` and is outside the range [0, 4].
115
+ """
100
116
return self ._row
101
117
102
118
@row .setter
@@ -110,11 +126,29 @@ def row(self, value: int | None):
110
126
111
127
@property
112
128
def width (self ) -> int :
129
+ """Gets the width of the item in the UI layout.
130
+
131
+ The width determines how much horizontal space this item occupies within its row.
132
+
133
+ Returns
134
+ -------
135
+ :class:`int`
136
+ The width of the item. Defaults to 1.
137
+ """
113
138
return 1
114
139
115
140
@property
116
141
def view (self ) -> V | None :
117
- """The underlying view for this item."""
142
+ """Gets the parent view associated with this item.
143
+
144
+ The view refers to the container that holds this item. This is typically set
145
+ automatically when the item is added to a view.
146
+
147
+ Returns
148
+ -------
149
+ Optional[:class:`View`]
150
+ The parent view of this item, or ``None`` if the item is not attached to any view.
151
+ """
118
152
return self ._view
119
153
120
154
async def callback (self , interaction : Interaction ):
You can’t perform that action at this time.
0 commit comments