<?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[Labels dynamisch ansprechen]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>gibt es eine Möglichkeit, das ich z.B. vier auf meinem Form plazierte Labels mit<br />
folgender Bezeichnung:</p>
<p>Label1, Label2, Label3, Label4</p>
<p>über eine Schleife dynamisch ansprechen kann? Soll heißen, dass ich z.B. folgendes<br />
Schleifenkonstukt habe:</p>
<pre><code class="language-cpp">for(int ii = 1; ii &lt;= 4; ii++)
{
   Form-&gt;Label+ii-&gt;Caption = &quot;Hallo&quot;;

}
</code></pre>
<p>damit nach der ausführung jedes Label den Text &quot;Hallo&quot; besitzt???</p>
<p>Vielen Dank für die Antworten</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/155852/labels-dynamisch-ansprechen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 19:48:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/155852.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Aug 2006 12:08:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:08:30 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>gibt es eine Möglichkeit, das ich z.B. vier auf meinem Form plazierte Labels mit<br />
folgender Bezeichnung:</p>
<p>Label1, Label2, Label3, Label4</p>
<p>über eine Schleife dynamisch ansprechen kann? Soll heißen, dass ich z.B. folgendes<br />
Schleifenkonstukt habe:</p>
<pre><code class="language-cpp">for(int ii = 1; ii &lt;= 4; ii++)
{
   Form-&gt;Label+ii-&gt;Caption = &quot;Hallo&quot;;

}
</code></pre>
<p>damit nach der ausführung jedes Label den Text &quot;Hallo&quot; besitzt???</p>
<p>Vielen Dank für die Antworten</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114507</guid><dc:creator><![CDATA[skluge]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:08:30 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:17:43 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>siehe FAQ, Abschnitt <em>Komponenten benutzen</em>.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114519</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:17:43 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:19:19 GMT]]></title><description><![CDATA[<p>Hi akari,</p>
<p>wo finde ich den diesen eintrag in den FAQ's?<br />
Kannste mir die URL posten?</p>
<p>Danke!</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114522</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114522</guid><dc:creator><![CDATA[skluge]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:23:21 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>zum Beispiel <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39211.html" rel="nofollow">hier</a>.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114531</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:34:58 GMT]]></title><description><![CDATA[<p>Das ist schon mal ein gutes Beispiel,</p>
<p>doch für mich stellt sich jetzt die Frage, ob das oben genannte Beispiel von mir auch so in diesem Stil funktionieren kann. Denn die Labels wurden einfach per Drag&amp;drop auf das Form gesetzt, nun spuckt mir der Compiler verständlicherweiße einen Fehler aus, da er das Label &quot;Label+ii&quot; nicht kennt oder es bzw. kein Element von Form ist!</p>
<p>Kann man das trotzdem in dieser Form irgendwie Lösen?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114543</guid><dc:creator><![CDATA[skluge]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:34:58 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:37:03 GMT]]></title><description><![CDATA[<p>Hast du den Link verfolgt?</p>
<p>Nein, so wie du das willst lässt sich das nicht lösen. Nur mit dynamisch zur Laufzeit erzeugten Komponenten geht das.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114546</guid><dc:creator><![CDATA[Christian411]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:37:03 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 12:41:15 GMT]]></title><description><![CDATA[<p>Hallo</p>
<blockquote>
<p>Nur mit dynamisch zur Laufzeit erzeugten Komponenten geht das.</p>
</blockquote>
<p>Also das stimmt so nicht.<br />
Auch Entwurfszeit-Komponenten lassen sich in Arrays einordnen, muß eben nur einmal zur Laufzeit in das (dafür dann statische) Array eingetragen werden. Dann kann man genauso auf dieses Array zugreifen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114552</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114552</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 10 Aug 2006 12:41:15 GMT</pubDate></item><item><title><![CDATA[Reply to Labels dynamisch ansprechen on Thu, 10 Aug 2006 13:55:11 GMT]]></title><description><![CDATA[<p>okokok</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1114635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1114635</guid><dc:creator><![CDATA[Christian411]]></dc:creator><pubDate>Thu, 10 Aug 2006 13:55:11 GMT</pubDate></item></channel></rss>