<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to set advanced properties for UI elements (styles) and get more information on micropython modules]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I was a bit frustrated with the documentation of the UI elements, so I started digging. I wanted to share the information I found with other beginners like me so they won't need to spend the 2-3 hours I did spend to set the border colour of a button.</p>
<p dir="auto">Trick 1: you need to understand that the M5stack_ui are basically the micropython bindings of LVGL (version 7). This means whatever you need to know, you can find in the LVGL documentation.</p>
<p dir="auto">Trick 2: as the documentation of the python modules on the M5Stack page is incomplete, it helps to inspect the actually implemented functions by using something like:</p>
<p dir="auto">btn = M5Btn()<br />
print(dir(btn))</p>
<p dir="auto">which returns:<br />
['<strong>class</strong>', '<strong>init</strong>', '<strong>module</strong>', '<strong>qualname</strong>', '<strong>dict</strong>', 'cb', 'delete', 'get_state', 'obj', 'set_align', 'set_bg_color', 'set_cb', 'set_hidden', 'set_pos', 'set_size', 'style', 'set_btn_text', 'set_btn_text_color', 'set_btn_text_font', 'pressed', 'released', '<strong>callback</strong>', 'btn_text', 'btn_label_obj'</p>
<p dir="auto">This shows, for example, that there is actualy the function set_btn_text implemented (which is not documented), and that we have the "obj" attribute which allows us to modify all of the objects parameters.</p>
<p dir="auto">Result:<br />
As an example, to create a button with a specific corner radius and the border colour set, you need to create a style, set the parameters of the style and the apply the style to the object:</p>
<p dir="auto">btn = M5Btn(text="--", x=180, y=70,w= 120, h=100, bg_c=UI_BTN_CLR ,text_c=UI_TEXT_COLOUR ,font=FONT_MONT_38)<br />
se_style = lv.style_t()   # create the style<br />
se_style.set_border_color(lv.STATE.DEFAULT,lv.color_hex6(UI_BTN_CLR))<br />
se_style.set_radius(lv.STATE.DEFAULT,8)<br />
btn.obj.add_style(btn.obj.PART.MAIN,se_style) # add it to the btn parent object</p>
<p dir="auto">Hope this is helpful to somebody (even though no one asked...)</p>
]]></description><link>https://community.m5stack.com/topic/5566/how-to-set-advanced-properties-for-ui-elements-styles-and-get-more-information-on-micropython-modules</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 02:46:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5566.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Aug 2023 23:34:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 21 Aug 2023 08:20:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a> lol, they were created to stop spammers and bots from joining and well I only check to see if people put things in the box’s. The actual content of the answers are not often checked</p>
]]></description><link>https://community.m5stack.com/post/22021</link><guid isPermaLink="true">https://community.m5stack.com/post/22021</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 21 Aug 2023 08:20:04 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Tue, 22 Aug 2023 02:44:23 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, it is the OCD and autism combining with the ADD, lol</p>
]]></description><link>https://community.m5stack.com/post/22018</link><guid isPermaLink="true">https://community.m5stack.com/post/22018</guid><dc:creator><![CDATA[mtylerjr]]></dc:creator><pubDate>Tue, 22 Aug 2023 02:44:23 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 21 Aug 2023 07:16:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a> you didn’t need to write an essay</p>
]]></description><link>https://community.m5stack.com/post/22017</link><guid isPermaLink="true">https://community.m5stack.com/post/22017</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 21 Aug 2023 07:16:28 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 21 Aug 2023 06:40:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/csierra67" aria-label="Profile: csierra67">@<bdi>csierra67</bdi></a> I didn't even know that group existed! I just applied too.</p>
<p dir="auto">I had to be creative to get most of my M5Stack products in their tiny limited "What M5Stack Products do you own" textbox though, lol.</p>
<h6>"Core2AWS,Extension,HMI,16Servo</h6>
<h6>CoreS3</h6>
<h6>StickC+,Vibe,Spkr2</h6>
<h6>Paper</h6>
<h6>AtomS3,S3Lite,Lite,SmartSpkr,Tail485,TailBat,ProtoHub</h6>
<h6>StampS3,C3,ExtendI/O,BreakOut</h6>
<h6>UnitV,4Relay,ENV3,Angle,Torch,Gesture,RFID2,Hall,Infrared,PIR,AC,CardKB,Vibe,IO-Hub,Serial-IO,IO2,1-3Hub"</h6>
]]></description><link>https://community.m5stack.com/post/22016</link><guid isPermaLink="true">https://community.m5stack.com/post/22016</guid><dc:creator><![CDATA[mtylerjr]]></dc:creator><pubDate>Mon, 21 Aug 2023 06:40:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sun, 20 Aug 2023 05:57:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> thanks for the answer, just applied for membership</p>
]]></description><link>https://community.m5stack.com/post/22005</link><guid isPermaLink="true">https://community.m5stack.com/post/22005</guid><dc:creator><![CDATA[csierra67]]></dc:creator><pubDate>Sun, 20 Aug 2023 05:57:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sat, 19 Aug 2023 06:19:25 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, was busy and forgot to answer.<br />
<a href="https://www.facebook.com/groups/m5stack" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.facebook.com/groups/m5stack</a></p>
]]></description><link>https://community.m5stack.com/post/22004</link><guid isPermaLink="true">https://community.m5stack.com/post/22004</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 19 Aug 2023 06:19:25 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sat, 19 Aug 2023 02:26:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/csierra67" aria-label="Profile: csierra67">@<bdi>csierra67</bdi></a> I just tried "m5stack facebook" in google, and first hit was <a href="https://www.facebook.com/M5Stack/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.facebook.com/M5Stack/</a></p>
]]></description><link>https://community.m5stack.com/post/22001</link><guid isPermaLink="true">https://community.m5stack.com/post/22001</guid><dc:creator><![CDATA[mtylerjr]]></dc:creator><pubDate>Sat, 19 Aug 2023 02:26:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Fri, 18 Aug 2023 10:57:59 GMT]]></title><description><![CDATA[<p dir="auto">Keep an eye on the CoreS3 documentation page of the M5Stavk site as they are going to add a copy there</p>
]]></description><link>https://community.m5stack.com/post/21996</link><guid isPermaLink="true">https://community.m5stack.com/post/21996</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 18 Aug 2023 10:57:59 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Fri, 18 Aug 2023 09:21:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> I have been trying to find the FB group with no success. No link on the M5 stack web (Explore section). As I try to find a group in FB with the name M5 or M5 stack or M5 core.. not hit<br />
Could you share ?</p>
]]></description><link>https://community.m5stack.com/post/21993</link><guid isPermaLink="true">https://community.m5stack.com/post/21993</guid><dc:creator><![CDATA[csierra67]]></dc:creator><pubDate>Fri, 18 Aug 2023 09:21:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Tue, 15 Aug 2023 01:45:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/insanelx" aria-label="Profile: insaneLX">@<bdi>insaneLX</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/csierra67" aria-label="Profile: csierra67">@<bdi>csierra67</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/isoeek" aria-label="Profile: IsoEek">@<bdi>IsoEek</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a>  <a href="https://docs.m5stack.com/en/mpy/display/m5stack_lvgl" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/mpy/display/m5stack_lvgl</a><br />
This is M5Core2 micropython UI elements information</p>
]]></description><link>https://community.m5stack.com/post/21925</link><guid isPermaLink="true">https://community.m5stack.com/post/21925</guid><dc:creator><![CDATA[pandian.nano]]></dc:creator><pubDate>Tue, 15 Aug 2023 01:45:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 14 Aug 2023 08:54:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/isoeek" aria-label="Profile: isoeek">@<bdi>isoeek</bdi></a> no it not storage problem on my machine, it’s online storage and I have no style</p>
]]></description><link>https://community.m5stack.com/post/21914</link><guid isPermaLink="true">https://community.m5stack.com/post/21914</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 14 Aug 2023 08:54:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 14 Aug 2023 05:15:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Thank you. I'll do that. Do you need more storage space? I have a 500Gb M.2 that was used for a month. I don't need it. I have plenty of storage space. Do you want it? Ill send it to you for free. I like the cat ears. lol</p>
]]></description><link>https://community.m5stack.com/post/21909</link><guid isPermaLink="true">https://community.m5stack.com/post/21909</guid><dc:creator><![CDATA[IsoEek]]></dc:creator><pubDate>Mon, 14 Aug 2023 05:15:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 14 Aug 2023 04:58:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/isoeek" aria-label="Profile: IsoEek">@<bdi>IsoEek</bdi></a> I have old docs on my GitHub but the UIFlow stuff is supposed to be getting transferred to a website but I just cannot get a look for my website that makes me happy and so the docs don't get uploaded.<br />
The second biggest issue with the docs is that because they are so graphics heavy, I have you use crazy compression</p>
<p dir="auto">The stack chan craze and Neko craze is because of the massive support network in Japan for "cute "robots I confess that in the UK I too have a stack chan and working on a cosplay Neko cat ear project.</p>
]]></description><link>https://community.m5stack.com/post/21907</link><guid isPermaLink="true">https://community.m5stack.com/post/21907</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 14 Aug 2023 04:58:50 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 14 Aug 2023 01:28:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mtylerjr" aria-label="Profile: mtylerjr">@<bdi>mtylerjr</bdi></a> Thank you, that helps me. It's nice to see others that deal with the same thing and share a common interest. I agree with not releasing the hardware till the documentation was done. I feel lucky that my projects are pretty basic. I unfortunately know this is only till my knowledge broadens. What is the difference with Uiflow2? I went with 1 because it seems there is a lot of growing pains with anything new. I feel M5 makes small well packaged products. I really wish that we could copy and share blocks with others and paste them in any project. I'm sure there is a good reason why they don't do that. Thanks Mtylerjr for reaching out to encourage me. Let me know if you ever need anything. I agree with helping support ajb2k3. I do what I can. I hope M5 is helping to support him as well.</p>
]]></description><link>https://community.m5stack.com/post/21906</link><guid isPermaLink="true">https://community.m5stack.com/post/21906</guid><dc:creator><![CDATA[IsoEek]]></dc:creator><pubDate>Mon, 14 Aug 2023 01:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Mon, 14 Aug 2023 01:03:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/isoeek" aria-label="Profile: isoeek">@<bdi>isoeek</bdi></a> M5Stack is different. For now at least, it does take a lot of data-mining effort to find information - which is a barrier to those of us with ADD/ADHD obviously.</p>
<p dir="auto">Also, a lot of what exists is in non-english, as M5Stack's initial focus, going by social media, seems to be on Japan. And so there seems to be a heavier focus on cute "-chan" robots and "-neko" ears and that sort of japan-style "cute" stuff than stuff that would be generally helpful to your typical developer. But it seems to be financing their other development stuff, so whatever works, right? They are releasing new products every week now, so <em>something</em> is working.</p>
<p dir="auto">Dont give up though. We are all struggling with lack of information/documentation, but I think things are heading in the right direction. UIFlow2 is growing, is a much better system, and eventually should replace UIFlow1.</p>
<p dir="auto">Truthfully, I would have suggested they didnt release all the hardware before there was good documentation for it, but Im not in marketing, and it may not have been feasible. I guess all I am suggesting is "lots of us understand your difficulties trying to get accurate and usefull info/documentation, but dont give up."</p>
<p dir="auto">We should also definitely support those people that are working to fix the documentation problem, like ajb2k3</p>
<p dir="auto">and insaneLX's trick is very helpful</p>
]]></description><link>https://community.m5stack.com/post/21905</link><guid isPermaLink="true">https://community.m5stack.com/post/21905</guid><dc:creator><![CDATA[mtylerjr]]></dc:creator><pubDate>Mon, 14 Aug 2023 01:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sun, 13 Aug 2023 19:36:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Thank you. Is there an option for people who don't use facebook and all the other social media? That seems like a lot of work.</p>
]]></description><link>https://community.m5stack.com/post/21903</link><guid isPermaLink="true">https://community.m5stack.com/post/21903</guid><dc:creator><![CDATA[IsoEek]]></dc:creator><pubDate>Sun, 13 Aug 2023 19:36:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sun, 13 Aug 2023 07:48:51 GMT]]></title><description><![CDATA[<p dir="auto">I have been working on listing the GUI elements and the API's for Uiflow and UIFlow2 but as the document is still work in progress, its only available on the FB group for preview only.</p>
]]></description><link>https://community.m5stack.com/post/21896</link><guid isPermaLink="true">https://community.m5stack.com/post/21896</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 13 Aug 2023 07:48:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sun, 13 Aug 2023 02:11:24 GMT]]></title><description><![CDATA[<p dir="auto">Thank you. That is helpful.</p>
]]></description><link>https://community.m5stack.com/post/21893</link><guid isPermaLink="true">https://community.m5stack.com/post/21893</guid><dc:creator><![CDATA[IsoEek]]></dc:creator><pubDate>Sun, 13 Aug 2023 02:11:24 GMT</pubDate></item><item><title><![CDATA[Reply to How to set advanced properties for UI elements (styles) and get more information on micropython modules on Sat, 12 Aug 2023 17:18:29 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the sharing. Fully agree with you on the lack of documentation of UI flow. Actually I sent a post on this matter but did not get a single answer !</p>
]]></description><link>https://community.m5stack.com/post/21889</link><guid isPermaLink="true">https://community.m5stack.com/post/21889</guid><dc:creator><![CDATA[csierra67]]></dc:creator><pubDate>Sat, 12 Aug 2023 17:18:29 GMT</pubDate></item></channel></rss>