<?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[Suchfunktion wie (C++Builder-Hilfe unter Index)]]></title><description><![CDATA[<p>Moin zusammen,</p>
<p>ich sitz mal wieder an einer kleinen Suchfunktion. Sie soll so aussehen wie die von der Borland Hilfe sprich ich geben einen Buchstaben ein und es erscheinen alle Ergebnise die mit diesen Buchstaben anfangen.</p>
<p>Also hab das schon soweit, dass wenn ich alle Suchergebnise bekomme. Gebe ich jedoch den 2 Buchstaben ein findert er auch meine neuen Ergebnise löschte aber die alten aus der Listbix nicht..</p>
<p>wie löse ich das am besten mit ListBox1-&gt;Items-&gt;Clear();<br />
geht es irgendwie nicht..</p>
<p>jemand ne idee ?</p>
<p>Mfg</p>
<p>|10111|</p>
<pre><code class="language-cpp">if (Key != 8)
      {
      for (int i = 0; i&lt;TeleList-&gt;Count; i++)
              {
              asString = TeleList-&gt;Strings[i];
              for (Index; Index &lt; 256;Index++)
                     {
                      if (asString.Length() &gt;= Index)
                          {
                          if ((asString[Index] == Key) &amp;&amp; (Index == 1))
                                  {
                                  FindList-&gt;Add(TeleList-&gt;Strings[i]);
                                  break;
                                  }
                          else
                                if (asString[Index] == Key)
                                          {
                                          asString = asString.SubString(1,Index-1);
                                          if (asString == asText)
                                                  {
                                                  FindList-&gt;Add(TeleList-&gt;Strings[i]);
                                                  break;
                                                  }
                                          else break;
                                          }
                                else break;
                          }

                      }
              }
      Form1-&gt;ListBox1-&gt;Items = FindList;
      asText = asText + Key;
      Index++;
      }
else
        {
        asText = asText.Delete(Index-1,1);
        Index = Index - 1;
        delete FindList;
        if (Edit1-&gt;Text.Length() == 0)
                {
                Index = 1;
                asText = &quot;&quot;;
                }
        }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/87791/suchfunktion-wie-c-builder-hilfe-unter-index</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Jul 2026 11:18:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/87791.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Oct 2004 08:28:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 08:28:32 GMT]]></title><description><![CDATA[<p>Moin zusammen,</p>
<p>ich sitz mal wieder an einer kleinen Suchfunktion. Sie soll so aussehen wie die von der Borland Hilfe sprich ich geben einen Buchstaben ein und es erscheinen alle Ergebnise die mit diesen Buchstaben anfangen.</p>
<p>Also hab das schon soweit, dass wenn ich alle Suchergebnise bekomme. Gebe ich jedoch den 2 Buchstaben ein findert er auch meine neuen Ergebnise löschte aber die alten aus der Listbix nicht..</p>
<p>wie löse ich das am besten mit ListBox1-&gt;Items-&gt;Clear();<br />
geht es irgendwie nicht..</p>
<p>jemand ne idee ?</p>
<p>Mfg</p>
<p>|10111|</p>
<pre><code class="language-cpp">if (Key != 8)
      {
      for (int i = 0; i&lt;TeleList-&gt;Count; i++)
              {
              asString = TeleList-&gt;Strings[i];
              for (Index; Index &lt; 256;Index++)
                     {
                      if (asString.Length() &gt;= Index)
                          {
                          if ((asString[Index] == Key) &amp;&amp; (Index == 1))
                                  {
                                  FindList-&gt;Add(TeleList-&gt;Strings[i]);
                                  break;
                                  }
                          else
                                if (asString[Index] == Key)
                                          {
                                          asString = asString.SubString(1,Index-1);
                                          if (asString == asText)
                                                  {
                                                  FindList-&gt;Add(TeleList-&gt;Strings[i]);
                                                  break;
                                                  }
                                          else break;
                                          }
                                else break;
                          }

                      }
              }
      Form1-&gt;ListBox1-&gt;Items = FindList;
      asText = asText + Key;
      Index++;
      }
else
        {
        asText = asText.Delete(Index-1,1);
        Index = Index - 1;
        delete FindList;
        if (Edit1-&gt;Text.Length() == 0)
                {
                Index = 1;
                asText = &quot;&quot;;
                }
        }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/620417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620417</guid><dc:creator><![CDATA[*23*]]></dc:creator><pubDate>Mon, 04 Oct 2004 08:28:32 GMT</pubDate></item><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 08:49:35 GMT]]></title><description><![CDATA[<p>Hallo,<br />
du kannst mit der Funktion</p>
<pre><code class="language-cpp">TListBox-&gt;Items-&gt;Delete(int x);
</code></pre>
<p>die Spalte x löschen, also z.B. durch</p>
<pre><code class="language-cpp">ListBox1-&gt;Items-&gt;Delete(0);
</code></pre>
<p>die erste Zeile!</p>
<p>Geh einfach dynamisch alle Verfügbaren Zeilen durch und lösche diese dann, das sollte funktionieren!</p>
<p>Edit:<br />
z.B. so:</p>
<pre><code class="language-cpp">while(ListBox1-&gt;Items-&gt;Count != 0)
        ListBox1-&gt;Items-&gt;Delete(0);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/620425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620425</guid><dc:creator><![CDATA[Reyx]]></dc:creator><pubDate>Mon, 04 Oct 2004 08:49:35 GMT</pubDate></item><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 08:58:34 GMT]]></title><description><![CDATA[<p>danke für den Tip, bin ich aber auch schon drauf gekommen. geht aber nicht.. wieso auch immer..</p>
<p>und ob ich jetzt mit:</p>
<pre><code class="language-cpp">ListBox1-&gt;Items-&gt;Delete(0);
</code></pre>
<p>die einzelnen Zeilen löschen oder gleich mit</p>
<pre><code class="language-cpp">ListBox1-&gt;Clear();
</code></pre>
<p>den ganzen Inhalt der Listbox ist ja wohl egal wobei dei 2 Wahö, wohl besser ist..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/620432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620432</guid><dc:creator><![CDATA[*23*]]></dc:creator><pubDate>Mon, 04 Oct 2004 08:58:34 GMT</pubDate></item><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 09:12:14 GMT]]></title><description><![CDATA[<p><strong>ListBox1-&gt;Items-&gt;Clear();</strong> sollte grundsätzlich funktionieren. Setzte doch mal an entsprechender Stelle einen Breakpoint und steppe im Debugmodus durch. So kommt man am ehesten auf evtl. Logikfehler etc. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/620439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620439</guid><dc:creator><![CDATA[Peter]]></dc:creator><pubDate>Mon, 04 Oct 2004 09:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 10:13:20 GMT]]></title><description><![CDATA[<p>War mein Fehler. Ein dummer Denkfehler. Ich hab versucht die Listbox zu löschen aber ich müsste einfach nur die StringList leer machen und schon war das Problem weg.. *grrrrrr*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/620483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620483</guid><dc:creator><![CDATA[*23*]]></dc:creator><pubDate>Mon, 04 Oct 2004 10:13:20 GMT</pubDate></item><item><title><![CDATA[Reply to Suchfunktion wie (C++Builder-Hilfe unter Index) on Mon, 04 Oct 2004 10:56:04 GMT]]></title><description><![CDATA[<p>Na sowas !<br />
Solche Schusselfehler sind mir noch NIE passiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/620512</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/620512</guid><dc:creator><![CDATA[Peter]]></dc:creator><pubDate>Mon, 04 Oct 2004 10:56:04 GMT</pubDate></item></channel></rss>