<?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[TShape zur Laufzeit erstellen]]></title><description><![CDATA[<p>Hallo!</p>
<p>Habe mal wieder ein Problem! <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>Ich möchte nach jedem Click auf einen Button ein TShape erstellen.<br />
Nun dachte ich mir, ich nehme dafür am Besten ein Array welches ich zur Laufzeit erstelle. Ich habe im FAQ auch etwas gefunden, allerdings erstellt er mir keine TShapes sondern irgendeine Box!<br />
Weiss jemand was ich falsch mache!</p>
<pre><code class="language-cpp">DynamicArray&lt;TShape*&gt;LblArray;
     int LblNum = 10;
</code></pre>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
  LblArray.Length = LblNum;
  for (int i = 0; i &lt; LblArray.Length; i++)
  {
    LblArray[i] = new TShape(this);
  }
</code></pre>
<pre><code class="language-cpp">void __fastcall TForm1::Bspieler1Click(TObject *Sender)
{
for (int i = 0; i &lt; LblArray.Length; i++) 
  { 
    LblArray[i]-&gt;Parent = this; 
    //LblArray[i]-&gt;Caption = &quot;Shape&quot; + String(i+1); 
    LblArray[i]-&gt;Top = 20 * i; 
    LblArray[i]-&gt;Show(); 
  }
</code></pre>
<p>DANKE schon mal!</p>
<p>Gruß Eleonora</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/78217/tshape-zur-laufzeit-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 29 Jun 2026 11:43:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/78217.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Jun 2004 12:19:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TShape zur Laufzeit erstellen on Tue, 29 Jun 2004 12:19:28 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Habe mal wieder ein Problem! <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>Ich möchte nach jedem Click auf einen Button ein TShape erstellen.<br />
Nun dachte ich mir, ich nehme dafür am Besten ein Array welches ich zur Laufzeit erstelle. Ich habe im FAQ auch etwas gefunden, allerdings erstellt er mir keine TShapes sondern irgendeine Box!<br />
Weiss jemand was ich falsch mache!</p>
<pre><code class="language-cpp">DynamicArray&lt;TShape*&gt;LblArray;
     int LblNum = 10;
</code></pre>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
  LblArray.Length = LblNum;
  for (int i = 0; i &lt; LblArray.Length; i++)
  {
    LblArray[i] = new TShape(this);
  }
</code></pre>
<pre><code class="language-cpp">void __fastcall TForm1::Bspieler1Click(TObject *Sender)
{
for (int i = 0; i &lt; LblArray.Length; i++) 
  { 
    LblArray[i]-&gt;Parent = this; 
    //LblArray[i]-&gt;Caption = &quot;Shape&quot; + String(i+1); 
    LblArray[i]-&gt;Top = 20 * i; 
    LblArray[i]-&gt;Show(); 
  }
</code></pre>
<p>DANKE schon mal!</p>
<p>Gruß Eleonora</p>
]]></description><link>https://www.c-plusplus.net/forum/post/549768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/549768</guid><dc:creator><![CDATA[Eleonora]]></dc:creator><pubDate>Tue, 29 Jun 2004 12:19:28 GMT</pubDate></item><item><title><![CDATA[Reply to TShape zur Laufzeit erstellen on Tue, 29 Jun 2004 12:29:29 GMT]]></title><description><![CDATA[<p>Eleonora schrieb:</p>
<blockquote>
<p>allerdings erstellt er mir keine TShapes sondern irgendeine Box!</p>
</blockquote>
<p>Beim erzeugen eines TShape ist doch Standardsmäßig Shape=stRectangle;<br />
also eine Box, wenn du keine Box haben willst dann mach halt keine!</p>
<pre><code class="language-cpp">LblArray[i]-&gt;Parent = this; 
    LblArray[i]-&gt;Shape = stCircle;  //ich will z.B. Kreise 
    LblArray[i]-&gt;Top = 20 * i; 
    LblArray[i]-&gt;Show();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/549780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/549780</guid><dc:creator><![CDATA[VergissEs]]></dc:creator><pubDate>Tue, 29 Jun 2004 12:29:29 GMT</pubDate></item><item><title><![CDATA[Reply to TShape zur Laufzeit erstellen on Tue, 29 Jun 2004 13:20:03 GMT]]></title><description><![CDATA[<p>Super, danke! <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>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/549806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/549806</guid><dc:creator><![CDATA[Eleonora]]></dc:creator><pubDate>Tue, 29 Jun 2004 13:20:03 GMT</pubDate></item></channel></rss>