<?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[if-Anweisung für Leerfelder]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte meine Eingabefelder darauf hin überprüfen, ob auch wirklich was<br />
reingeschrieben worden ist. Habe es so probiert:</p>
<pre><code class="language-cpp">if (Form1-&gt;edZahlenanzahl-&gt;Text = '')
    {
      Form1-&gt;edZahlenanzahl = 0;
    }
</code></pre>
<p>Klappt aber nicht. Wie kann ich daß überprüfen?<br />
Gut wäre auch wenn eine Fehlermeldung erscheinen würde und beim betätigen dieser der Cursor ins jeweiligen Feld springt.</p>
<p>Danke<br />
yellow1</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/132191/if-anweisung-für-leerfelder</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 11:52:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/132191.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 Jan 2006 18:58:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 18:58:04 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte meine Eingabefelder darauf hin überprüfen, ob auch wirklich was<br />
reingeschrieben worden ist. Habe es so probiert:</p>
<pre><code class="language-cpp">if (Form1-&gt;edZahlenanzahl-&gt;Text = '')
    {
      Form1-&gt;edZahlenanzahl = 0;
    }
</code></pre>
<p>Klappt aber nicht. Wie kann ich daß überprüfen?<br />
Gut wäre auch wenn eine Fehlermeldung erscheinen würde und beim betätigen dieser der Cursor ins jeweiligen Feld springt.</p>
<p>Danke<br />
yellow1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961069</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961069</guid><dc:creator><![CDATA[yellow1]]></dc:creator><pubDate>Sun, 08 Jan 2006 18:58:04 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:01:34 GMT]]></title><description><![CDATA[<p>yellow1 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">if (Form1-&gt;edZahlenanzahl-&gt;Text = '')
</code></pre>
</blockquote>
<p>Das kann nicht funktionieren, da ein char-Literal nicht aus gar keinem Zeichen bestehen kann. Um zu überprüfen, ob eine AnsiString-Variable Text enthält, kannst du sie z.B. mit einem Leerstring (&quot;&quot;) vergleichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961077</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961077</guid><dc:creator><![CDATA[audacia]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:01:34 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:21:03 GMT]]></title><description><![CDATA[<p>was willst du mit:</p>
<p>yellow1 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">Form1-&gt;edZahlenanzahl = 0;
</code></pre>
</blockquote>
<p>bezwecken?</p>
<p>mfg<br />
BigNeal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961122</guid><dc:creator><![CDATA[BigNeal]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:21:03 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:25:04 GMT]]></title><description><![CDATA[<p>Ich möchte am liebsten daß wenn nichts eingegeben wurde eine fehlermeldung zum klicken erscheint und der cursor dann in daß jeweilige Feld springt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961130</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961130</guid><dc:creator><![CDATA[yellow1]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:25:04 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:30:11 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if(Edit1-&gt;Text==&quot;&quot;)
	{
	Application-&gt;MessageBox(&quot;Nix da&quot;,&quot;Edit1&quot;,MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL);
	Edit1-&gt;SetFocus();
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/961139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961139</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:32:57 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if(Form1-&gt;edZahlenanzahl-&gt;Text.IsEmpty())   {
   MessageBeep(0);
   ShowMessage(&quot;Bitte geben Sie ein gültigen Wert ein!&quot;);
   Form1-&gt;edZahlenanzahl-&gt;SetFocus();
   return;
}

// Tue was auch immer ...
</code></pre>
<p>EDIT: Mist zu spät...</p>
<p>@Christian211<br />
IsEmpty() eignet sich besser, da es imho auch Whitespaces als leer betrachtet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961145</guid><dc:creator><![CDATA[Reyx]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:32:57 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:39:23 GMT]]></title><description><![CDATA[<blockquote>
<p>IsEmpty() eignet sich besser, da es imho auch Whitespaces als leer betrachtet.</p>
</blockquote>
<p>Kann ich so nicht nach vollziehen</p>
<pre><code class="language-cpp">if(Edit1-&gt;Text.IsEmpty())
	Application-&gt;MessageBox(&quot;wer&quot;,&quot;leer&quot;,MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL);
</code></pre>
<p>Ergibt keine Meldung wenn Leerzeichen drin sind:</p>
<p>Demo:<br />
<a href="http://www.marquardtnet.info/cecke/links.7/unit1.zip" rel="nofollow">http://www.marquardtnet.info/cecke/links.7/unit1.zip</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/961164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961164</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:39:23 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:46:59 GMT]]></title><description><![CDATA[<p>Hab's ausprobiert, stimmt. Die beiden Methoden scheinen gleichwertig zu sein <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Naja, dann war ich halt mit meiner Antwort <em>nur</em> zu spät dran <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/961181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961181</guid><dc:creator><![CDATA[Reyx]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:47:07 GMT]]></title><description><![CDATA[<p>Danke, hat funktioniert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961183</guid><dc:creator><![CDATA[yellow1]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 19:59:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7397">@Reyx</a>:</p>
<p>Ja, schade habe die Methode nie benutzt, wäre aber mal was gewesen, Whitespaces werden gefiltert. Naja, vielleicht in der 2006er <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/961224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961224</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 08 Jan 2006 19:59:21 GMT</pubDate></item><item><title><![CDATA[Reply to if-Anweisung für Leerfelder on Sun, 08 Jan 2006 22:36:53 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Dazu ist doch die Funktion <em>Trim()</em> da.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/961399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/961399</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 08 Jan 2006 22:36:53 GMT</pubDate></item></channel></rss>