<?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[Zugriff auf alle Controls der Anwendung]]></title><description><![CDATA[<p>Hallo,</p>
<p>gibt es eine Möglichkeit, wie ich z.B. vom Hauptformular oder von der Application auf alle untergeordneten Controls zugreifen kann?</p>
<p>Gibt es da eine Liste oder eine Möglichkeit des rekursiven Abstiegs?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/113500/zugriff-auf-alle-controls-der-anwendung</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 11:55:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/113500.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Jun 2005 13:47:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Thu, 23 Jun 2005 13:47:09 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>gibt es eine Möglichkeit, wie ich z.B. vom Hauptformular oder von der Application auf alle untergeordneten Controls zugreifen kann?</p>
<p>Gibt es da eine Liste oder eine Möglichkeit des rekursiven Abstiegs?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815668</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Thu, 23 Jun 2005 13:47:09 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Thu, 23 Jun 2005 14:05:15 GMT]]></title><description><![CDATA[<p>TForm::Components ist dein Freund.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815724</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815724</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Thu, 23 Jun 2005 14:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Fri, 24 Jun 2005 09:20:08 GMT]]></title><description><![CDATA[<p>Dankeschön!</p>
<p>Habe übrigens Deine Anleitung &quot;Document-View mit Borland C++ Builder&quot; gelesen.</p>
<p>Das Thema ist für mich gerade sehr wichtig, da ich gerade ein CVM versuche zu implementieren.<br />
Problematisch für mich ist aber, dass ich eben keine TForms sondern TFrames als Views habe, welche nicht mehr durch die IDE als Views nutzbar sind, sobald ich diese in eine eigene Ableitungshierarchie überführe.</p>
<p>PS: Meine Forumsfragen drehten sich bisher immer um dieses Thema.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/816276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/816276</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Fri, 24 Jun 2005 09:20:08 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Fri, 24 Jun 2005 09:33:54 GMT]]></title><description><![CDATA[<p>Naja, statt einer direkten Ableitung kannst du da natürlich auch über eine Hilfsklasse gehen (hab noch nie mit frames gearbeitet...)</p>
<p>Ich könnte mir vorstellen, folgende Konstruktion müsste eigentlich funktionieren:</p>
<p>Du hast nach wie vor eine Dokumenten und eine View klasse. Wobei die Viewklasse keine Vorfahren mehr hat. Statt das du nun aber aus der View-Klasse ableitest, &quot;registrierst&quot; du das Frame bei der View klasse und &quot;klebst&quot; sie sozusagen zusammen.</p>
<p>Wenn nun ein Update läuft, dann macht die View klasse das Selbe wie sonst auch, aber hald auf dem &quot;verklebten&quot; Frame.</p>
<p>Etwas mühsam erklärt, iuch weiss... aber weisst du was ich meine?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/816285</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/816285</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Fri, 24 Jun 2005 09:33:54 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Fri, 24 Jun 2005 10:23:19 GMT]]></title><description><![CDATA[<p>Danke, das Forum gefällt mir immer besser. <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>Das müsste gehen, aber dazu muss jedes Frame da es einen anderen Typ hat, quasi gleich aber anders behandelt werden. <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>
<p>Ich versuche das mal per Mehrfachvererbung:</p>
<pre><code>|---------|     |---------------------|
|  TFrame |     |TViewimplementierung |
|---------|     |---------------------|
   A                     A 
   |---------|-----------|
             |
      |--------------|
      |  TmeinFrame  |
      |--------------|
</code></pre>
<p>Evetuell schluckt es so die IDE.</p>
<p>Andererseits schliesst sich der Kreis gerade bei einer Implementierung via Qt-Nachrichten mit CLX.<br />
Wenn bedarf besteht, dann kann ich später mal meine Lösung hier darstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/816317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/816317</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Fri, 24 Jun 2005 10:23:19 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Fri, 24 Jun 2005 11:40:08 GMT]]></title><description><![CDATA[<p>markus.r schrieb:</p>
<blockquote>
<p>Das müsste gehen, aber dazu muss jedes Frame da es einen anderen Typ hat, quasi gleich aber anders behandelt werden. <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>
</blockquote>
<p>Das muss es ja auch sonst? Es wäre in diesem Fall ja nur so, das du die Behandlung ausgelagert hast.</p>
<p>Quasi so:</p>
<pre><code>|---------|     |---------------------|
|  TFrame |&lt;----|TViewimplementierung |
|---------|     |---------------------|
                         |
                         |
                 |--------------|
                 |  TDocument   |
                 |--------------|
</code></pre>
<p>Das TView registriert sich beim TDocument<br />
Ein TFrame wird der Instanz von TView zugeordnet<br />
TDocument triggert TView mit UpdateData<br />
TView zeichnet die neuen Daten in den registrierten Frames des einen Typs.</p>
<p>Hat zur Folge, das du für jedes Frame noch eine ViewKlasse erstellen musst die das Frame intim kennt. Dafür hast du aber sauberes Doc/View. und den Spagat (Pfeil) geschafft zwischen Framework und Applikationskonzept</p>
]]></description><link>https://www.c-plusplus.net/forum/post/816395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/816395</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Fri, 24 Jun 2005 11:40:08 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Fri, 24 Jun 2005 12:07:03 GMT]]></title><description><![CDATA[<p>Daher habe ich eine hybride Lösung nun implementiert, in der jeder View eine eigene Implementierung hat, jedoch das Interface der Views trotzdem einheitlich durch Verwendung von Qt-Messages ist.</p>
<pre><code>|-------------|
| Controller  |
|-------------|
     |\
     | \ sendet Qt-Nachricht an
     |  \
     |   ---------------\
     |                  |
|-------------|    |----------|
| TFrame1     |    | TFrame2  |
|-------------|    |----------|
| behandle()  |    |behandle()|
|-------------|    |----------|
      |                 |
      |-----------------|
               |
               V
         |----------|
         |  TFrame  |
         |----------|
         |----------|
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/816430</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/816430</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Fri, 24 Jun 2005 12:07:03 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Mon, 27 Jun 2005 09:04:14 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wenn man Nachrichten in CLX/Qt an alle Fenster verteilen will, dann ist das wie folgt möglich:</p>
<pre><code class="language-cpp">void TForm1::broadcast(TWidgetControl* p_twidgetc, QCustomEventH* p_event)
{
//Broadcast via rekursivem Abstieg
for (int i= 0; i &lt; p_twidgetc-&gt;ComponentCount; ++i)
  {//ueber alle direkten Komponenten
  if (TWidgetControl* twc=   
    dynamic_cast&lt;TWidgetControl*&gt;(p_twidgetc-&gt;Components[i]))
    {
    QApplication_sendEvent(twc-&gt;Handle, p_event);
    //Absteigen
    broadcast(twc, p_event);
    }
  }
}//broadcast
</code></pre>
<p>Das wird dann z.B. so aufgerufen:</p>
<pre><code class="language-cpp">broadcast(static_cast&lt;TWidgetControl*&gt;(this),
            QCustomEvent_create(MyEvent_ID, this));
</code></pre>
<p>Vielleicht kann man den ganzen Thread mal in Form einer Anleitung hier der Nachwelt zur Verfügung stellen, da das leider weder von Borland noch sonst wo im Internet dokumentiert ist.</p>
<p>Gruss<br />
Markus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/817900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/817900</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Mon, 27 Jun 2005 09:04:14 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Mon, 27 Jun 2005 09:46:41 GMT]]></title><description><![CDATA[<p>markus.r schrieb:</p>
<blockquote>
<p>Vielleicht kann man den ganzen Thread mal in Form einer Anleitung hier der Nachwelt zur Verfügung stellen, da das leider weder von Borland noch sonst wo im Internet dokumentiert ist.</p>
</blockquote>
<p>Unsere FAQ lebt von freien Schreiberlingen. Was spricht dagegen, das du den Artikel gleich schnell verfasst? (o;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/817927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/817927</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Mon, 27 Jun 2005 09:46:41 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf alle Controls der Anwendung on Tue, 28 Jun 2005 12:24:49 GMT]]></title><description><![CDATA[<p>Selbstverständlich! <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/818948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818948</guid><dc:creator><![CDATA[markus.r]]></dc:creator><pubDate>Tue, 28 Jun 2005 12:24:49 GMT</pubDate></item></channel></rss>