<?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[Solution to make Button disappear]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/2953/core2-make-button-disappear">[Core2] make Button disappear</a><br />
Re: <a href="/topic/2953/core2-make-button-disappear">[Core2] make Button disappear</a></p>
<p dir="auto">I found the following solution, which works for me (extract only):</p>
<pre><code>Button* button1 = NULL;
// create button
if (button1) delete(button1);
button1 = new Button(0, 0, 158, 80, false);
// disable button
button1-&gt;delHandlers(_softButtonEvent);
// the following line is optional, does not change anything if button is deleted
// button1-&gt;erase(BLACK); // documentation in M5Button.h -&gt; line 716
delete(button1);

// that trick does it; other approaches did not work reliably
button1 = new Button(0, 0, 0, 0, false, ""); 
</code></pre>
]]></description><link>https://community.m5stack.com/topic/2971/solution-to-make-button-disappear</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:12:22 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2971.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Feb 2021 13:05:30 GMT</pubDate><ttl>60</ttl></channel></rss>