<?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[In neuer Komponente Shapes einfügen]]></title><description><![CDATA[<p>Hallo zusammen,<br />
ich habe eine Neue Komponente aus TShape erstellt, und möchte darin gerne ein weiteres TShape zeichnen (Komponente soll ein Quadrat und darin ein Kreis zeichnen).<br />
Theoretisch sollte es auch funktionieren, tut es aber nicht. Ich vermute es liegt daran, das ich den Shapes nicht sagen kann, wer das parent ist. Habt ihr ne Idee wie ich das Problemchen lösen kann??<br />
Danke im vorraus</p>
<pre><code>__fastcall TEinbauten::TEinbauten(TComponent* Owner)
        : TShape(Owner)
{
 Shape1 = new TShape(this);
 Shape2 = new TShape(this);

 Shape1-&gt;Shape = stRectangle;
 Shape1-&gt;Brush-&gt;Style = bsSolid;
 Shape1-&gt;Pen-&gt;Style = psSolid;
 Shape1-&gt;Left   = 30;  // nur testwerte
 Shape1-&gt;Top    = 30; // nur testwerte
 Shape1-&gt;Height = 40; // nur testwerte
 Shape1-&gt;Width = 40; // nur testwerte

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/101009/in-neuer-komponente-shapes-einfügen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 11:07:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/101009.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 Feb 2005 14:16:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 14:16:39 GMT]]></title><description><![CDATA[<p>Hallo zusammen,<br />
ich habe eine Neue Komponente aus TShape erstellt, und möchte darin gerne ein weiteres TShape zeichnen (Komponente soll ein Quadrat und darin ein Kreis zeichnen).<br />
Theoretisch sollte es auch funktionieren, tut es aber nicht. Ich vermute es liegt daran, das ich den Shapes nicht sagen kann, wer das parent ist. Habt ihr ne Idee wie ich das Problemchen lösen kann??<br />
Danke im vorraus</p>
<pre><code>__fastcall TEinbauten::TEinbauten(TComponent* Owner)
        : TShape(Owner)
{
 Shape1 = new TShape(this);
 Shape2 = new TShape(this);

 Shape1-&gt;Shape = stRectangle;
 Shape1-&gt;Brush-&gt;Style = bsSolid;
 Shape1-&gt;Pen-&gt;Style = psSolid;
 Shape1-&gt;Left   = 30;  // nur testwerte
 Shape1-&gt;Top    = 30; // nur testwerte
 Shape1-&gt;Height = 40; // nur testwerte
 Shape1-&gt;Width = 40; // nur testwerte

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/721476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721476</guid><dc:creator><![CDATA[GoTschA]]></dc:creator><pubDate>Sat, 12 Feb 2005 14:16:39 GMT</pubDate></item><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 14:48:51 GMT]]></title><description><![CDATA[<p>Shape zwei wird nix zugewiesen?</p>
<p>Bye, TGGC (<a href="http://www.fh-merseburg.de/~roesch/piped/piped.php" rel="nofollow">Pipe my World.</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/721503</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721503</guid><dc:creator><![CDATA[TGGC]]></dc:creator><pubDate>Sat, 12 Feb 2005 14:48:51 GMT</pubDate></item><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 14:49:37 GMT]]></title><description><![CDATA[<p>ich weiss, diesen Code hatte ich zwecks übersichtlichkeit entfernt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/721504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721504</guid><dc:creator><![CDATA[GoTschA]]></dc:creator><pubDate>Sat, 12 Feb 2005 14:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 14:56:49 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>da du ein Shape nicht als Parent zuweisen kannst, kannst du eigentlich nur die Shapes auf den selben Parent (das Form) stellen und das innere Shape von den Werten her festlegen</p>
<pre><code class="language-cpp">TShape *NewShape;

  NewShape = new TShape(this);
  NewShape-&gt;Parent = Shape1-&gt;Parent;
  NewShape-&gt;Left = Shape1-&gt;Left + 20;
  NewShape-&gt;Top = Shape1-&gt;Top + 20;
  NewShape-&gt;Width = Shape1-&gt;Width - 40;
  NewShape-&gt;Height = Shape1-&gt;Height - 40;
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/721508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721508</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 12 Feb 2005 14:56:49 GMT</pubDate></item><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 15:01:16 GMT]]></title><description><![CDATA[<p>NewShape-&gt;Parent = Shape1-&gt;Parent;</p>
<p>Aber genau das ist das Problem, Shape1-&gt;Parent kenne ich ja nicht. Da ich nicht weiss wie das parent heisst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/721509</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721509</guid><dc:creator><![CDATA[GoTschA]]></dc:creator><pubDate>Sat, 12 Feb 2005 15:01:16 GMT</pubDate></item><item><title><![CDATA[Reply to In neuer Komponente Shapes einfügen on Sat, 12 Feb 2005 15:04:03 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>es spielt doch keine Rolle, wie der Parent heißt oder was das genau ist. Solange du die Referenz des Parents von äußeren Shape hast, kannst du diesen für andere Controls als Parent benutzen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/721512</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/721512</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 12 Feb 2005 15:04:03 GMT</pubDate></item></channel></rss>