Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 26 Apr 2024, 02:18

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 03 Apr 2017, 22:41 
Offline

Joined: 22 Dec 2016, 20:45
Posts: 4
hey,

i have use this code in TsDBCTRLGRID with PaintPanel event but color dont work , but same code with normal TDBCTRLGRID it's work parfect . :mrgreen:

// CREP = TsDBCTRLGRID ; number of the row = 4 and col = 4

procedure Trepartiteur.CREPPaintPanel(DBCtrlGrid: TsDBCtrlGrid;
Index: Integer);
var
r: TRect;
begin
r := Rect(0,0,CREP.PanelWidth-4,CREP.PanelHeight-4);

// color panel
if CREP.DataSource.DataSet.FieldByName('Is_free').AsBoolean then
CREP.Canvas.Brush.Color := $0088FF88
else
CREP.Canvas.Brush.Color := clBtnFace;

// paint panel
CREP.Canvas.FillRect(r);

//
if CREP.PanelIndex = Index then
CREP.Canvas.DrawFocusRect(r);

end;


Top
 Profile  
 
PostPosted: 05 Apr 2017, 13:54 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

Please, write, what is TsDBCTRLGRID
EhLib doesn't have component with such a name.

_________________
Best regards
EhLib Support Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


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