AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Cross-Platform-Entwicklung Zugriff auf Zelle in TStringGrid (FMX) XE6
Thema durchsuchen
Ansicht
Themen-Optionen

Zugriff auf Zelle in TStringGrid (FMX) XE6

Ein Thema von eddie11 · begonnen am 24. Apr 2014 · letzter Beitrag vom 25. Apr 2014
 
eddie11

Registriert seit: 8. Nov 2005
Ort: Zossen bei Berlin
236 Beiträge
 
Delphi XE8 Professional
 
#1

Zugriff auf Zelle in TStringGrid (FMX) XE6

  Alt 24. Apr 2014, 12:00
Hi allerseits,

bis einschließlich XE5 konnte ich mit CellControlByRow auf eine einzelne Zelle einer TStringColumn zugreifen.
Das habe ich getan, um z.B. die Textfarbe einer Zelle zu ändern.

Delphi-Quellcode:
type
  TColumnAccess = class( TColumn )
  end;

procedure TForm1.Button2Click(Sender: TObject);
var
  Col, Row: Integer;
  CellCtrl: TStyledControl;
begin
  for Col := 0 to StringGrid1.ColumnCount - 1 do begin
    for Row := 0 to StringGrid1.RowCount - 1 do begin
      CellCtrl := TColumnAccess( StringGrid1.Columns[ Col ] ).CellControlByRow( Row );
      if ( CellCtrl <> nil ) and ( CellCtrl is TTextCell ) then begin
        TTextCell( CellCtrl ).StyledSettings := [];
        TTextCell( CellCtrl ).FontColor := claBlueViolet;
        TTextCell( CellCtrl ).Font.Family := 'Times New Roman';
        TTextCell( CellCtrl ).Font.Style := [ TFontStyle.fsBold ];
        TTextCell( CellCtrl ).Font.Size := 14;
      end;
    end;
  end;
end;
Das funzt jetzt mit XE6 nicht mehr. Anscheinend gibt CellControlByRow nicht mehr die gewünschte Zelle zurück.
Hat jemend von Euch ein ähnliches Problem und evtl. schon eine Lösung gefunden?
Edgar Leifeld
Liebe Grüße aus Zossen bei Berlin

Die Kontramedüse ist verdrupelt!!!
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz