![]() |
Zelle wird nicht gefärbt
Guten abend
Hab mal folgendes Problem Ich färbe meine Zelle mit der eingabe von Strings und zwar so
Delphi-Quellcode:
ist das Kürzel np eingegeben Färbt sich die Zelle in der eingestellten Farbe.
if LowerCase(GetLowerValue(ACol, ARow)) = 'np' then
begin StC.Brush.Color := sNPColor; //Zellenfarbe unterer Teil StC.Font.Color := sNPFontColor; //Schriftfarbe StC.Font.Style := StC.Font.Style + [fsBold]; //Text fett end; Schreibe ich den String in eine Variable funzt das ganze nicht mehr warum??
Delphi-Quellcode:
if LowerCase(Cells[ACol, ARow]) = sKuerzelLeer1 then // hier die Variable
begin StC.Brush.Color := sColorLeer1; //Zellenfarbe StC.Font.Color := sLeer1FontColor; //Schriftfarbe StC.Font.Style := StC.Font.Style + [fsBold]; //Text fett end; |
Re: Zelle wird nicht gefärbt
Versuch es mal mit
Delphi-Quellcode:
LowerCase( Trim( sKuerzelLeer1))
|
Re: Zelle wird nicht gefärbt
nee daran liegt es auch nicht
|
Re: Zelle wird nicht gefärbt
Was macht GetLowerValue()?
|
Re: Zelle wird nicht gefärbt
Upss
Meine Zellen sind geteilt und damit wirds geprüft aber eigentlci heist es auch so
Delphi-Quellcode:
if LowerCase(Cells[ACol, ARow]) = 'np' then
begin StC.Brush.Color := sNPColor; //Zellenfarbe StC.Font.Color := sNPFontColor; //Schriftfarbe StC.Font.Style := StC.Font.Style + [fsBold]; //Text fett end; |
Re: Zelle wird nicht gefärbt
Dann lass dir mal im Debugger beides anzeigen
|
Re: Zelle wird nicht gefärbt
Wird alles korekt aus gegeben
Und die Variable hat auch den richtigen wert befor die abfrage kommt?? Ich bin echt ratlos mit einem Direkten string funzt es 'Test'; |
Re: Zelle wird nicht gefärbt
Also ich glaube das leigt an diesem Delphi hab wirklich nichts um geproggt und jetzt geht es auf einmal
Hoffe das passiert nicht nochmal |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:38 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 by Thomas Breitkreuz