Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 21 May 2024, 03:42

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 27 Nov 2022, 10:57 
Offline

Joined: 13 Jun 2012, 14:17
Posts: 15
Hi,

I want to set the text to 'X' when the Fieldname is 'ARTID' and the value is '1'. The following code didn't work. What ist the best solution todo it?

Code:
    if ((Column.FieldName = 'ARTID') and ((TDBGridEh(Sender).DataSource.DataSet.FieldByName('ARTID').asInteger=1) then
    begin
      text:='X';
      ARect:= Rect;
      TDBGridEh(Sender).Canvas.FillRect(ARect);
      drawTextEh(TDBGridEh(Sender).Canvas.Handle,Pchar(Text),length(Text),ARect,DT_Right);
    end;


I use it in OnDrawColumnCell.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group