Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by tom_po,
30. Mai 2006
die daten werden nun wieder korrekt im dbisamgrid angezeigt, die zahlen kleiner 100 sind jedoch nicht in rot...
procedure TForm3.DBISAMDBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
can: TCanvas;
begin
can := (sender as TDBisamDBGrid).Canvas;
if column.Field.FieldName = 'stock' then
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by tom_po,
30. Mai 2006
mein code sieht momentan so aus, geht aber noch nicht, angezeigte Zahlen im String "laufen durch".
procedure TForm3.DBISAMDBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
DBISAMQuery1.SQL.text := 'select * from stockfabric';
DBISAMQuery1.Open;
if dbisamquery1.FieldByName('stock').Asfloat = 100 then
...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by tom_po,
28. Mai 2006
ich habe den Code jetzt so geändert, geht aber noch nicht...
procedure TForm3.DBISAMDBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
DBISAMQuery1.SQL.Clear;
DBISAMQuery1.SQL.Add('select * from stockfabric');
DBISAMQuery1.ExecSQL;
if dbisamquery1.FieldByName('stock').Asfloat <= 100 then
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by tom_po,
28. Mai 2006
habe es so jetzt ergänzt, funktioniert aber noch nicht:
procedure TForm3.DBISAMDBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if ('stock' <= floattostr(100)) then
begin
canvas.Font.Style := canvas.Font.Style + ;
canvas.Font.Color := clred;
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by tom_po,
28. Mai 2006
ich hole aus meiner dbisam-tabelle "stockfabric" unter anderem Vorratszahlen und möchte alle Werte bis 100 (des field "stock") in rot in meiner applikation (dbisamgrid1 mit dbisamquery1) darstellen, wie binde ich dies ein?
Hier mein Code:
procedure TForm3.ToolButton3Click(Sender: TObject);
begin
DBISAMQuery1.SQL.Clear;
DBISAMQuery1.SQL.Add('select code as "Código",desc as "Descrição",maq...