<?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[ComboBox Item umbenennen]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich denn während der Laufzeit bei einer ComboBox das aktive Item umbennen? Habe mir eine Stunde Beiträge zum Thema ComboBox durchgelesen, aber<br />
mein Problem war nicht behandelt.</p>
<p>Gruß Mark</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/194876/combobox-item-umbenennen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 06:50:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/194876.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Oct 2007 17:08:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:08:46 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich denn während der Laufzeit bei einer ComboBox das aktive Item umbennen? Habe mir eine Stunde Beiträge zum Thema ComboBox durchgelesen, aber<br />
mein Problem war nicht behandelt.</p>
<p>Gruß Mark</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383047</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383047</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:08:46 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:26:46 GMT]]></title><description><![CDATA[<p>Hi, versuchs mal so:</p>
<pre><code>int i = this-&gt;ComboBox1-&gt;ItemIndex; //auslesen des aktiven items
ComboBox1-&gt;Items-&gt;Delete(i); //löschen des selbigen
ComboBox1-&gt;Items-&gt;Insert(i, &quot;Neuer Eintrag&quot;); //einfügen des neuen Eintrags an selber Stelle
ComboBox1-&gt;ItemIndex = i; //Gehe zu dem Eintrag
</code></pre>
<p>mfg<br />
Rai</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383058</guid><dc:creator><![CDATA[raimond]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:43:59 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>@ raimond : Du benennst nicht ein Item um sondern ersetzt es.<br />
Das umbenennen geht einfacher</p>
<pre><code class="language-cpp">ComboBox1-&gt;Items-&gt;Strings[ComboBox1-&gt;ItemIndex] = &quot;Neuer Eintrag&quot;;
</code></pre>
<p>Das hätte man auch der BCB-Hilfe zu TComboBox/TStringList herausfinden können.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383074</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:43:59 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:47:25 GMT]]></title><description><![CDATA[<p>Danke erstmal,</p>
<p>aber ich würde gerne das aufgerufene Item in der ComboBox ändern, nur sobald ich das tue springt der Index auf -1 zurück.<br />
meine Hoffnung war diese Modifikation:<br />
[cpp]<br />
int i = this-&gt;ProfilnameBox-&gt;ItemIndex; //auslesen des aktiven items<br />
ProfilnameBox-&gt;Items-&gt;Delete(i); //löschen des selbigen<br />
ProfilnameBox-&gt;Items-&gt;Insert(i, <strong>ProfilnameBox-&gt;Text</strong>); //einfügen des neuen Eintrags an selber Stelle<br />
ProfilnameBox-&gt;ItemIndex = i; //Gehe zu dem Eintrag<br />
[/cpp]<br />
das führt aber dazu das ein weiteres Item eingefügt wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383076</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383076</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:49:37 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Siehe meinen Post.<br />
Natürlich wäre es noch klug vorher zu überprüfen ob ItemIndex &gt;= 0 ist, sonst gibts einen Laufzeitfehler.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383080</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 17:57:47 GMT]]></title><description><![CDATA[<p>Hallo Akari,</p>
<p>Dein Post hatte ich noch nicht gelesen als ich am schreiben <a href="http://war.So" rel="nofollow">war.So</a> hatte ich es auch gesehen, aber wie kann ich den ItemIndex speichern und vor allem wann,<br />
denn sobald ich in die Box schreibe springt deren ItemIndex auf eben die -1.<br />
Ich könnte einen Button der einen Edit-Modus auslöst hinzufügen, aber ich würde halt gerne einfach das Item überschreiben und speichern klicken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383087</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383087</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Thu, 11 Oct 2007 17:57:47 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 18:02:10 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Verwende den OnChange-Event der ComboBox. Da kannst du nach jeder Auswahl eiens Items den ItemIndex in eine Membervariable des Forms zwischenspeichern. Diesen Buffer kannst du dann später wieder verwenden.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383094</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383094</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 11 Oct 2007 18:02:10 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 18:11:03 GMT]]></title><description><![CDATA[<p>genau da beißt sich die Katze in den Schwanz - das OnChange-Event wir auch beim<br />
Überschreiben einens Items ausgelöst und dann habe ich wieder -1.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383101</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Thu, 11 Oct 2007 18:11:03 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 18:13:43 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Dann must du noch ein bool-Flag als Member des Forms verwenden. Sobald du ein Item ändern willst setzt du das Flag auf false, danach wieder auf true. Und nun kannst du im OnChange-Event zuerst dieses Flag überprüfen. Ist es auf false, überschreibst du den ItemIndex-Buffer nicht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383104</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 11 Oct 2007 18:13:43 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Thu, 11 Oct 2007 18:21:33 GMT]]></title><description><![CDATA[<p>ok, jetzt habe ich es kapiert und so klappt es dann auch.</p>
<p>Vielen Dank an alle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383118</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Thu, 11 Oct 2007 18:21:33 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Fri, 12 Oct 2007 03:19:09 GMT]]></title><description><![CDATA[<p>warum nicht einfach so ?</p>
<pre><code class="language-cpp">int index = ComboBox1-&gt;ItemIndex;
ComboBox1-&gt;Items-&gt;Strings[index] = &quot;Neuer Eintrag&quot;;
ComboBox1-&gt;ItemIndex = index;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1383322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383322</guid><dc:creator><![CDATA[OldMan00]]></dc:creator><pubDate>Fri, 12 Oct 2007 03:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox Item umbenennen on Fri, 12 Oct 2007 05:30:39 GMT]]></title><description><![CDATA[<p>weil der neue Eintrag nicht einfach &quot;neuer Eintrag&quot; sondern ComboBox1-&gt;Text sein soll und schreiben in die ComboBox einen OnChange Event auslöst der den Item Index auf -1 setzt und zwar bereits beim eintippen und nicht erst beim verlassen des Focus. Aber ich habe jetzt so gelöst:<br />
Im OnChange Event</p>
<pre><code class="language-cpp">if(ComboBox1-&gt;ItemIndex!=-1)
{
item_nr=ComboBox1-&gt;ItemIndex;
};
</code></pre>
<p>Damit bleibt item_nr auf dem letzten echtem Item stehen.<br />
die Variable int item_nr ist im Header als privat deklariert</p>
<p>und bei meinem speichern Button ist jetzt:</p>
<pre><code class="language-cpp">ComboBox1-&gt;Items-&gt;Strings[item_nr] = ComboBox1-&gt;Text;
</code></pre>
<p>Aber das entspricht auch in etwa Akaris Vorschlag.</p>
<p>Gruß Mark</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1383334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1383334</guid><dc:creator><![CDATA[heutmalhier]]></dc:creator><pubDate>Fri, 12 Oct 2007 05:30:39 GMT</pubDate></item></channel></rss>