<?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[Problem with M5TextBox]]></title><description><![CDATA[<p dir="auto">I'm having an odd problem displaying text. Certain coordinates do not display certain characters, etc.</p>
<p dir="auto">See the code below. The D does not display in label1. This came up initially when I was trying to position text to be correctly centered at 90 degree rotation.</p>
<p dir="auto">from m5stack import *<br />
from m5ui import *<br />
from uiflow import *</p>
<p dir="auto">@timerSch.event('timer1')<br />
def ttimer1():<br />
global curLetter</p>
<p dir="auto">if curLetter == "A":<br />
curLetter = "B"<br />
else:<br />
if curLetter == "B":<br />
curLetter = "C"<br />
else:<br />
if curLetter == "C":<br />
curLetter = "D"<br />
else:<br />
if curLetter == "D":<br />
curLetter = "A"<br />
label0.setText(curLetter)<br />
label1.setText(curLetter)<br />
pass</p>
<p dir="auto">setScreenColor(0x000000)<br />
curLetter = "A"<br />
label0 = M5TextBox(25, 20, curLetter, lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)<br />
label1 = M5TextBox(29, 80, curLetter, lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)<br />
timerSch.run('timer1', 500, 0x00)</p>
]]></description><link>https://community.m5stack.com/topic/1774/problem-with-m5textbox</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 03:03:20 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1774.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Mar 2020 01:26:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with M5TextBox on Fri, 20 Mar 2020 10:46:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3136">@noiseislife</a></p>
<p dir="auto">With a little "wait_ms()" its more clear what you mean :-)</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *

setScreenColor(0x111111)
label1 = M5TextBox(05, 05, "a", lcd.FONT_Default,0xFFFFFF, rotate=0)
label2 = M5TextBox(05, 20, "x", lcd.FONT_Default,0xFFFFFF, rotate=0)
label0 = M5TextBox(16, 50, "A", lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)

for angle in range(91):
  label0.setRotate(angle)
  label1.setText('angle:' + str(angle))
  wait_ms(50)

for posX in range(16, 256):
  label0.setPosition(x=posX)
  label2.setText('pos-x:' + str(posX))
  wait_ms(100)
</code></pre>
<p dir="auto">I am sure it is ones more a bug :-)<br />
You can check this, if you let the angle zero. You can see that the char disappears at pos-x  =  33. And the same behavior occurs, if you have rotated the char. It is obviously one more of the uncountable bugs.</p>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1">@M5Stack</a>: Why does the M5Stack not draw a char if a small part is outside of the screen? We can display a char half way, if it is rotated, but not if it is at angle 0 degrees. That makes no sense. Maybe someone would like to program a scrolling text so that chars appears on the right and disappears on the left.</p>
<p dir="auto">Best regards<br />
Thomas</p>
]]></description><link>https://community.m5stack.com/post/7843</link><guid isPermaLink="true">https://community.m5stack.com/post/7843</guid><dc:creator><![CDATA[M5StickFreakler]]></dc:creator><pubDate>Fri, 20 Mar 2020 10:46:48 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Fri, 20 Mar 2020 10:19:23 GMT]]></title><description><![CDATA[<p dir="auto">I know what you're saying seems logical, but it is simply not the case.</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *

setScreenColor(0x111111)
label0 = M5TextBox(16, 38, "A", lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)
angle = None
x = None
angle = 0
for count in range(90):
  label0.setRotate(angle)
  angle = (angle if isinstance(angle, int) else 0) + 1
x = 16
for count2 in range(25):
  label0.setPosition(x=x)
  x = (x if isinstance(x, int) else 0) + 1
</code></pre>
<p dir="auto">And the video:<br />
<a href="https://youtu.be/qsKmaJEeI6A" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/qsKmaJEeI6A</a></p>
]]></description><link>https://community.m5stack.com/post/7842</link><guid isPermaLink="true">https://community.m5stack.com/post/7842</guid><dc:creator><![CDATA[noiseislife]]></dc:creator><pubDate>Fri, 20 Mar 2020 10:19:23 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Fri, 20 Mar 2020 02:13:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3136">@noiseislife</a> Because the rotation causes the coordinates to shift out of the screen, it cannot be total displayed. You only need to adjust the coordinates to display it completely.</p>
]]></description><link>https://community.m5stack.com/post/7832</link><guid isPermaLink="true">https://community.m5stack.com/post/7832</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Fri, 20 Mar 2020 02:13:45 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Thu, 19 Mar 2020 23:52:09 GMT]]></title><description><![CDATA[<p dir="auto">What I was really trying to do was to center letters rotated 90 degrees, but even with that rotation the D disappears. You can change the angle in my code example to see this.</p>
]]></description><link>https://community.m5stack.com/post/7831</link><guid isPermaLink="true">https://community.m5stack.com/post/7831</guid><dc:creator><![CDATA[noiseislife]]></dc:creator><pubDate>Thu, 19 Mar 2020 23:52:09 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Thu, 19 Mar 2020 21:22:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/3136">@noiseislife</a></p>
<p dir="auto">The "problem" in your example is, that the letter D is to wide to display completely on the display.<br />
Unfortunately letters are suppressed if they have not enough space on screen.</p>
<p dir="auto">This Example works :-)</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *

@timerSch.event('timer1')

def ttimer1():
  
  global curLetter

  if curLetter == "A":
    curLetter = "B"
  else:
    if curLetter == "B":
      curLetter = "C"
    else:
      if curLetter == "C":
        curLetter = "D"
      else:
        if curLetter == "D":
          curLetter = "A"
          
  label0.setText(curLetter)
  label1.setText(curLetter)
  pass

setScreenColor(0x000000)
curLetter = "A"
label0 = M5TextBox(25, 20, curLetter, lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)
label1 = M5TextBox(25, 80, curLetter, lcd.FONT_DejaVu72,0xFFFFFF, rotate=0)

timerSch.run('timer1', 500, 0x00)
</code></pre>
<p dir="auto">Best regards<br />
Thomas</p>
]]></description><link>https://community.m5stack.com/post/7829</link><guid isPermaLink="true">https://community.m5stack.com/post/7829</guid><dc:creator><![CDATA[M5StickFreakler]]></dc:creator><pubDate>Thu, 19 Mar 2020 21:22:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Thu, 19 Mar 2020 14:52:04 GMT]]></title><description><![CDATA[<p dir="auto">Here's a video of my output.</p>
<p dir="auto"><a href="https://www.youtube.com/watch?v=nYwlS4ADqOg&amp;feature=youtu.be" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=nYwlS4ADqOg&amp;feature=youtu.be</a></p>
<p dir="auto">I tried firmware versions 1.4.4, 1.4.5, and 1.4.5.1 thinking maybe that's related but they all behaved the same.</p>
<p dir="auto">I'm not really sure what else I can do to troubleshoot this since it seems unique to my device.</p>
]]></description><link>https://community.m5stack.com/post/7827</link><guid isPermaLink="true">https://community.m5stack.com/post/7827</guid><dc:creator><![CDATA[noiseislife]]></dc:creator><pubDate>Thu, 19 Mar 2020 14:52:04 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with M5TextBox on Thu, 19 Mar 2020 03:33:35 GMT]]></title><description><![CDATA[<p dir="auto">I tested it and when it runs, the two texts can go from A-&gt; B-&gt; C-&gt; D, and it looks like there is no problem.</p>
]]></description><link>https://community.m5stack.com/post/7819</link><guid isPermaLink="true">https://community.m5stack.com/post/7819</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Thu, 19 Mar 2020 03:33:35 GMT</pubDate></item></channel></rss>