<?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[State.Contains(gdFixed) in DBGrid]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich versuche gerade das Aussehen eines DBGrids zu verändern. Klappt auch alles ganz gut im Datenteil.</p>
<p>Mein Problem: ich möchte in der Titelzeile in das Sortierfeld eine Grafik einbinden.</p>
<p>Ich habe aber keine Möglichkeit in diese fixierten Zellen zu gelangen. Nach BCB-Hilfe sollte das über State.Contains(gdFixed) gehen, aber OHNE Erfolg.</p>
<p>Hat jemand von euch einen Vorschlag?</p>
<p>vielen Dank<br />
MG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/109575/state-contains-gdfixed-in-dbgrid</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 10:32:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/109575.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 May 2005 12:23:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 12:23:06 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich versuche gerade das Aussehen eines DBGrids zu verändern. Klappt auch alles ganz gut im Datenteil.</p>
<p>Mein Problem: ich möchte in der Titelzeile in das Sortierfeld eine Grafik einbinden.</p>
<p>Ich habe aber keine Möglichkeit in diese fixierten Zellen zu gelangen. Nach BCB-Hilfe sollte das über State.Contains(gdFixed) gehen, aber OHNE Erfolg.</p>
<p>Hat jemand von euch einen Vorschlag?</p>
<p>vielen Dank<br />
MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786504</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Wed, 11 May 2005 12:23:06 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 12:30:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>du must den OnDrawColumnCell-Event benutzten.<br />
Dann kannst du abfragen, ob gerade eine feste Zelle gezeichnet wird.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786514</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786514</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 11 May 2005 12:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 12:41:32 GMT]]></title><description><![CDATA[<p>Ich benutze den OnDrawColumnCell-Event.</p>
<p>Aber der gdFixed-Ereigniss tritt nicht ein. (Hab es mit einer MSG-Box probiert), Aber seht selbst:</p>
<pre><code>void __fastcall TFormularMainData::GridMainViewDrawColumnCell(TObject *Sender,
      const TRect &amp;Rect, int DataCol, TColumn *Column,
      TGridDrawState State)
{
   if (State.Contains(gdSelected))  {
      GridMainView-&gt;Canvas-&gt;Brush-&gt;Color = clNavy;
      GridMainView-&gt;Canvas-&gt;Font-&gt;Color = clCream;
   }

   if (State.Contains(gdFixed))  {
      Application-&gt;MessageBox(&quot;gdFixed&quot;,&quot;msg&quot;,MB_OK);

   }
}
</code></pre>
<p>Der Teil mit &quot;gdSelected&quot; funktioniert!!!</p>
<p>Gruß MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786523</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Wed, 11 May 2005 12:41:32 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 13:09:48 GMT]]></title><description><![CDATA[<p>TStringGrid verwenden?!</p>
<p><a href="http://community.borland.com/article/0,1410,20845,00.html" rel="nofollow">http://community.borland.com/article/0,1410,20845,00.html</a></p>
<p>schonmal gegoogelt? gibts unzählige seiten zu dem thema!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786550</guid><dc:creator><![CDATA[Sunday]]></dc:creator><pubDate>Wed, 11 May 2005 13:09:48 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 13:17:05 GMT]]></title><description><![CDATA[<p>Mit StringGrid funktioniert ja alles perfekt! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> Es funktioniert NICHT im DBGrid!!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Die VErwendung der einzelnen Komponenten sind mir schon bekannt <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>Gruß MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786571</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Wed, 11 May 2005 13:17:05 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Wed, 11 May 2005 21:12:19 GMT]]></title><description><![CDATA[<p>Ausgehend von <a href="http://groups.google.com/groups?hl=de&amp;lr=&amp;threadm=8cu4p8%24fqe%241%40nnrp1.deja.com&amp;rnum=2&amp;prev=/groups%3Fhl%3Dde%26lr%3D%26q%3Ddbgrid%2Bgdfixed%26btnG%3DSuche%26meta%3Dgroup%253Dborland.public.*" rel="nofollow">diesem Newsgroup-Beitrag</a> musst du von TDBGrid ableiten, die DrawCell-Methode überschreiben und dort nach Bedarf die DrawFixedCell-Methode aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786981</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Wed, 11 May 2005 21:12:19 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Thu, 12 May 2005 06:24:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/52">@Jansen</a>,</p>
<p>hast du schon einmal so eine Methode überschrieben. Ich hab jetzt eine Stunde hin und her probiert - Aber alles schein nicht zu funktionieren. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Hast du da einen Code-Ansatz für mich? <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>Vielen Dank<br />
MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787067</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Thu, 12 May 2005 06:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Thu, 12 May 2005 07:22:04 GMT]]></title><description><![CDATA[<p>Du musst die Komponente ableiten und dort die entspr. Funktion überschreiben!</p>
<p>P.S. zeig erstmal Deinen Code-Ansatz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787092</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787092</guid><dc:creator><![CDATA[Sunday]]></dc:creator><pubDate>Thu, 12 May 2005 07:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Thu, 12 May 2005 08:19:01 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>hier mein Versuch:</p>
<p>Ich habe die Dateien Grid.hpp und DBGrids.hpp aus dem include-Verzeichnis des BCB in mein Projektverzeichnis kopiert.</p>
<p>Dann habe ich in der Datei Grid.hpp die OnDrawCell-Funktion erweitert.<br />
Vorher:</p>
<pre><code>protected:
	DYNAMIC void __fastcall ColumnMoved(int FromIndex, int ToIndex);
	virtual void __fastcall DrawCell(int ACol, int ARow, const Types::TRect &amp;ARect, TGridDrawState AState);
	DYNAMIC AnsiString __fastcall GetEditText(int ACol, int ARow);
	DYNAMIC void __fastcall SetEditText(int ACol, int ARow, const AnsiString Value);
	DYNAMIC void __fastcall RowMoved(int FromIndex, int ToIndex);
</code></pre>
<p>Nachher:</p>
<pre><code>protected:
	DYNAMIC void __fastcall ColumnMoved(int FromIndex, int ToIndex);
	virtual void __fastcall DrawCell(int ACol, int ARow, const Types::TRect &amp;ARect, TGridDrawState AState); {
            if (AState.Contains == gdFixed) and Assigned(fOnDrawFixedCell) {
               fOnDrawFixedCell(Self, ACol, ARow, ARect, AState );
            }
         }
	DYNAMIC AnsiString __fastcall GetEditText(int ACol, int ARow);
	DYNAMIC void __fastcall SetEditText(int ACol, int ARow, const AnsiString Value);
	DYNAMIC void __fastcall RowMoved(int FromIndex, int ToIndex);
</code></pre>
<p>Aber das funktioniert leider nicht. Kann mir jemand helfen, da ich noch nie irgendwelche Klassen abgeleitet habe und mir dazu (denk ich mal und wird auch so sein <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="🙂"
    /> ) das nötige Grundverständnis fehlt. Dieses Lücke möchte ich aber gern schließen und brauch dazu eure Hilfe!!!</p>
<p>1000 Dank<br />
MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787142</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Thu, 12 May 2005 08:19:01 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Thu, 12 May 2005 08:30:06 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>1. auf keinen Fall die Original-Dateien verändern!<br />
2. zum Entwickeln von Komponenten kannst du hier nachlesen<br />
<a href="http://bcb-tutorial.c-plusplus.net/index_old.html" rel="nofollow">http://bcb-tutorial.c-plusplus.net/index_old.html</a><br />
allerdings solltest du vorher OOP-Grundlagen besitzen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787154</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 12 May 2005 08:30:06 GMT</pubDate></item><item><title><![CDATA[Reply to State.Contains(gdFixed) in DBGrid on Thu, 12 May 2005 09:24:41 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe das Problem jetzt anders gelöst:<br />
Um eine kleine Grafik in den festen Teil des DBGrids einzufügen, prüfe ich im DrawColumnCell-Event die erste Datenreihe und schreibe das Bild dann nicht mit top = rect.top sondern mit einem festen Wert &quot;2&quot;.</p>
<p>ABER SEHT SELBST:</p>
<pre><code>if (Column-&gt;FieldName == sort_field &amp;&amp; MainView-&gt;RecNo == 1)
		{
			if (sort_desc &gt; 0)	{
			   GridMainView-&gt;Canvas-&gt;Draw(Rect.Left+Rect.Width()-Master-&gt;SortDESC-&gt;Width-1, 2, Master-&gt;SortDESC-&gt;Picture-&gt;Graphic);
            		}
			else {
			   GridMainView-&gt;Canvas-&gt;Draw(Rect.Left+Rect.Width()-Master-&gt;SortASC-&gt;Width-1, 2, Master-&gt;SortASC-&gt;Picture-&gt;Graphic);
            			}
		}
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> DANKE FÜR JEGLICHE HILFE VON EUCH <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Viele Grüße<br />
MG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787190</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787190</guid><dc:creator><![CDATA[mgaertner]]></dc:creator><pubDate>Thu, 12 May 2005 09:24:41 GMT</pubDate></item></channel></rss>