<?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[Memofeld bei Eingabe vergrößern]]></title><description><![CDATA[<p>ich erzeuge ein Memofeld. Nun will ich erreichen, dass bei Texteingabe sich automatisch die Breite anpasst und bei Returndruck auch entsprechend die Höhe. Wie kann ich so eine &quot;Stretch&quot;-Funktion erreichen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190574/memofeld-bei-eingabe-vergrößern</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 14:47:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190574.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Aug 2007 08:18:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Memofeld bei Eingabe vergrößern on Fri, 24 Aug 2007 08:18:28 GMT]]></title><description><![CDATA[<p>ich erzeuge ein Memofeld. Nun will ich erreichen, dass bei Texteingabe sich automatisch die Breite anpasst und bei Returndruck auch entsprechend die Höhe. Wie kann ich so eine &quot;Stretch&quot;-Funktion erreichen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1350942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1350942</guid><dc:creator><![CDATA[AlexanderHH]]></dc:creator><pubDate>Fri, 24 Aug 2007 08:18:28 GMT</pubDate></item><item><title><![CDATA[Reply to Memofeld bei Eingabe vergrößern on Fri, 24 Aug 2007 10:57:10 GMT]]></title><description><![CDATA[<p>man könnte zum Beispiel mit OnKeyPress arbeiten</p>
<pre><code class="language-cpp">void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &amp;Key,
      TShiftState Shift)
{
  // FormCreate: Edit1-&gt;Width = 50;

  if (Edit1-&gt;Text.Length() &gt; 4)
  {
    Edit1-&gt;Width = Edit1-&gt;Text.Length() * x;
  }
}
</code></pre>
<p>mit dem Wert x muss man kompensieren, das ein zeichen ja größer als ein pixel ist... Die Werte stimmen also noch nicht ganz, aber auf die schnelle kann man das ja mal probieren.</p>
<p>MfG<br />
Tippo</p>
<p>PS: Vielleicht gibt es aber auch noch eine elegantere Methode ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1351057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1351057</guid><dc:creator><![CDATA[Tippokrates]]></dc:creator><pubDate>Fri, 24 Aug 2007 10:57:10 GMT</pubDate></item><item><title><![CDATA[Reply to Memofeld bei Eingabe vergrößern on Fri, 24 Aug 2007 11:34:03 GMT]]></title><description><![CDATA[<p>Statt Text.Length() wäre hier eher die Verwendung von TCanvas::TextWidth (auch für TMemo) sowie TCanvas::TextHeight() angebracht. Beide Funktionen geben die Breite bzw. Höhe des angegebenen Textes in Pixel zurück.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1351080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1351080</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 24 Aug 2007 11:34:03 GMT</pubDate></item><item><title><![CDATA[Reply to Memofeld bei Eingabe vergrößern on Fri, 24 Aug 2007 13:41:39 GMT]]></title><description><![CDATA[<p>ich sach doch, einer von den SpecialProggern findet noch ne bessere Lösung ^^ Aber die Idee war ja schon mal ganz gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1351203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1351203</guid><dc:creator><![CDATA[Tippokrates]]></dc:creator><pubDate>Fri, 24 Aug 2007 13:41:39 GMT</pubDate></item></channel></rss>