Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Selektierte Zeile fett (https://www.delphipraxis.net/131345-selektierte-zeile-fett.html)

Chillkröte 23. Mär 2009 17:41


Selektierte Zeile fett
 
Hallo
ich habe ein Problem mit meinem Stringgrid.
In diesem Stringgrid möchte ich eine bestimmte Zeile fett haben.
Diese Zeile wird automatisch selektiert (funktioniert auch einwandfrei)

in "ondrawcell"
Delphi-Quellcode:
if fett then
 begin
  if (acol = x) and (arow = y) then
   begin
    with (sender as tstringgrid) do
     begin
      canvas.Font.Style := [fsbold];
     end;
   end;
 end;
wenn ich das canvas oben weglasse wird das gesamte stringgrid fett
wenn ich es stehenlasse passiert nichts

kann mir jemand helfen?

PS: Crosspost

mkinzler 23. Mär 2009 17:47

Re: Selektierte Zeile fett
 
Du musst im else Zweig, den normalen Fontstyle setzen

Chillkröte 23. Mär 2009 17:51

Re: Selektierte Zeile fett
 
ändert sich trotzdem nichts :S

Delphi-Quellcode:
if fett then
 begin
  if (acol = x) and (arow = y) then
   begin
    with (sender as tstringgrid) do
     begin
      Font.Style := [fsbold];
     end;
   end
   else (sender as tstringgrid).Font.Style := [];
 end;
edit:
... k danke:D
hab was vergessen^^
geht jetzt


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz