<?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[Blödes Problem mit Button-&amp;gt;Enabled!]]></title><description><![CDATA[<p>Also ein Button ist erstmal deaktiviert. Der soll nämlich nur aktiviert sein, wenn ein Item eines Listviews markiert ist. Sobald aber kein Item mehr im Listiew aktiviert ist, soll der Button aber auch wieder deaktiviert werden:</p>
<pre><code>void __fastcall TF_Main::ListViewSelectItem(TObject *Sender,
      TListItem *Item, bool Selected)
{
        Button-&gt;Enabled = true;
}
//---------------------------------------------------------------------------
void __fastcall TF_Main::ListViewExit(TObject *Sender)
{
        Button-&gt;Enabled = false;
}
</code></pre>
<p>Das ist erstmal meine simple &quot;Lösung&quot;, die aber nicht funktioniert! Sobald ich auf den Button klicke, wird der erst deaktiviert, folglich hat der Klick auf den Button keine Wirkung!<br />
Das kann doch nicht so schwer sein!??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/141466/blödes-problem-mit-button-gt-enabled</link><generator>RSS for Node</generator><lastBuildDate>Mon, 03 Aug 2026 14:45:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/141466.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Mar 2006 11:22:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Blödes Problem mit Button-&amp;gt;Enabled! on Wed, 22 Mar 2006 11:22:02 GMT]]></title><description><![CDATA[<p>Also ein Button ist erstmal deaktiviert. Der soll nämlich nur aktiviert sein, wenn ein Item eines Listviews markiert ist. Sobald aber kein Item mehr im Listiew aktiviert ist, soll der Button aber auch wieder deaktiviert werden:</p>
<pre><code>void __fastcall TF_Main::ListViewSelectItem(TObject *Sender,
      TListItem *Item, bool Selected)
{
        Button-&gt;Enabled = true;
}
//---------------------------------------------------------------------------
void __fastcall TF_Main::ListViewExit(TObject *Sender)
{
        Button-&gt;Enabled = false;
}
</code></pre>
<p>Das ist erstmal meine simple &quot;Lösung&quot;, die aber nicht funktioniert! Sobald ich auf den Button klicke, wird der erst deaktiviert, folglich hat der Klick auf den Button keine Wirkung!<br />
Das kann doch nicht so schwer sein!??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021601</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021601</guid><dc:creator><![CDATA[apo]]></dc:creator><pubDate>Wed, 22 Mar 2006 11:22:02 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Problem mit Button-&amp;gt;Enabled! on Wed, 22 Mar 2006 11:27:29 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>vergiß den Exit-Event und überprüf im SelectItem, ob ListView-&gt;Selected ungleich NULL.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021606</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021606</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 22 Mar 2006 11:27:29 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Problem mit Button-&amp;gt;Enabled! on Wed, 22 Mar 2006 12:10:56 GMT]]></title><description><![CDATA[<p>Danke, so funktioniert es ganz gut:</p>
<pre><code>void __fastcall TF_Main::ListViewSelectItem(TObject *Sender,
      TListItem *Item, bool Selected)
{
        Button-&gt;Enabled = ListView-&gt;Selected;
}
</code></pre>
<p>Jetzt nervt nur noch etwas, dass das ListView zwar den Focus verliert, aber dessen Item immer noch selected ist. Das verwirrt, weil es so ausschaut, als ob nichts markiert wäre...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021628</guid><dc:creator><![CDATA[apo]]></dc:creator><pubDate>Wed, 22 Mar 2006 12:10:56 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Problem mit Button-&amp;gt;Enabled! on Wed, 22 Mar 2006 12:15:17 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Siehe <em>ListView::HideSelection</em>.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021632</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 22 Mar 2006 12:15:17 GMT</pubDate></item><item><title><![CDATA[Reply to Blödes Problem mit Button-&amp;gt;Enabled! on Wed, 22 Mar 2006 12:30:14 GMT]]></title><description><![CDATA[<p>Ich muss an der Stelle mal ein ganz großes Lob loswerden:<br />
Du bist wirklich super - schnell und kompetent!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1021643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1021643</guid><dc:creator><![CDATA[apo]]></dc:creator><pubDate>Wed, 22 Mar 2006 12:30:14 GMT</pubDate></item></channel></rss>