@@ -53,13 +53,66 @@ M5Line
5353
5454.. autoclass :: m5ui.line.M5Line
5555 :members:
56-
56+
57+ .. py :method :: set_line_color(color, opa, part)
58+
59+ Set the color of the line.
60+
61+ :param int color: The color to set.
62+ :param int opa: The opacity of the color.
63+ :param int part: The part of the object to apply the style to (e.g., lv.PART.MAIN).
64+
65+ UiFlow2 Code Block:
66+
67+ |set_line_color.png |
68+
69+ MicroPython Code Block:
70+
71+ .. code-block :: python
72+
73+ line_0.set_line_color(0x FF0000 , 255 , lv.PART .MAIN )
74+
75+ .. py :method :: set_style_line_width(width, part)
76+
77+ Set the width of the line.
78+
79+ :param int width: The width to set.
80+ :param int part: The part of the object to apply the style to (e.g., lv.PART.MAIN).
81+
82+ UiFlow2 Code Block:
83+
84+ |set_style_line_width.png |
85+
86+ MicroPython Code Block:
87+
88+ .. code-block :: python
89+
90+ line_0.set_style_line_width(2 , lv.PART .MAIN )
91+
92+ .. py :method :: set_flag(flag, value)
93+
94+ Set a flag on the object. If ``value `` is True, the flag is added; if False, the flag is removed.
95+
96+ :param int flag: The flag to set.
97+ :param bool value: If True, the flag is added; if False, the flag is removed.
98+ :return: None
99+
100+ UiFlow2 Code Block:
101+
102+ |set_flag.png |
103+
104+ MicroPython Code Block:
105+
106+ .. code-block :: python
107+
108+ button_0.set_flag(lv.obj.FLAG .HIDDEN , True )
109+
57110 .. py :method :: set_pos(x, y)
58111
59- Set the position of the switch .
112+ Set the position of the line .
60113
61- :param int x: The x-coordinate of the switch .
62- :param int y: The y-coordinate of the switch .
114+ :param int x: The x-coordinate of the line .
115+ :param int y: The y-coordinate of the line .
63116
64117 UiFlow2 Code Block:
65118
@@ -69,13 +122,13 @@ M5Line
69122
70123 .. code-block :: python
71124
72- switch_0 .set_pos(100 , 100 )
125+ line_0 .set_pos(100 , 100 )
73126
74127 .. py :method :: set_x(x)
75128
76- Set the x-coordinate of the switch .
129+ Set the x-coordinate of the line .
77130
78- :param int x: The x-coordinate of the switch .
131+ :param int x: The x-coordinate of the line .
79132
80133 UiFlow2 Code Block:
81134
@@ -85,13 +138,13 @@ M5Line
85138
86139 .. code-block :: python
87140
88- switch_0 .set_x(100 )
141+ line_0 .set_x(100 )
89142
90143 .. py :method :: set_y(y)
91144
92- Set the y-coordinate of the switch .
145+ Set the y-coordinate of the line .
93146
94- :param int y: The y-coordinate of the switch .
147+ :param int y: The y-coordinate of the line .
95148
96149 UiFlow2 Code Block:
97150
@@ -101,12 +154,12 @@ M5Line
101154
102155 .. code-block :: python
103156
104- switch_0 .set_y(100 )
157+ line_0 .set_y(100 )
105158
106159
107160 .. py :method :: align_to(obj, align, x, y)
108161
109- Align the switch to another object.
162+ Align the line to another object.
110163
111164 :param lv.obj obj: The object to align to.
112165 :param int align: The alignment type.
@@ -121,4 +174,4 @@ M5Line
121174
122175 .. code-block :: python
123176
124- switch_0 .align_to(page_0, lv.ALIGN .CENTER , 0 , 0 )
177+ line_0 .align_to(page_0, lv.ALIGN .CENTER , 0 , 0 )
0 commit comments