Subject | Highlighting a specific panel in a IB_CtrlGrid |
---|---|
Author | mgallego@i-mailbox.net |
Post date | 2001-02-27T23:49:29Z |
Hi guys:
I have a problem with the IB_CtrlGrid. I want to highlight a specific
panel of an IB_CtrlGrid when it gets focused. I can do it easily on a
DBCtrlGrid like this:
procedure TForm1.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid; Index:
Integer);
begin
if DBCtrlGrid1.PanelIndex = Index then
begin
DBCtrlGrid.Canvas.Brush.Color := clTeal;
DBCtrlGrid1.Canvas.Rectangle
(0,0,DBCtrlGrid.Width,DBCtrlGrid.Height);
end;
end;
Using IB_CtrlGrid (this does not work):
procedure TMainForm.IB_CtrlGrid1PaintPanel(IB_CtrlGrid: TIB_CtrlGrid;
RowNum: Integer);
begin
if IB_CtrlGrid1.PanelIndex = RowNum then
begin
IB_CtrlGrid1.Canvas.Brush.Color := clTeal;
IB_CtrlGrid1.Canvas.Rectangle(0, 0, IB_CtrlGrid1.Width,
IB_CtrlGrid1.Height);
end;
end;
Why?
Marlon
I have a problem with the IB_CtrlGrid. I want to highlight a specific
panel of an IB_CtrlGrid when it gets focused. I can do it easily on a
DBCtrlGrid like this:
procedure TForm1.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid; Index:
Integer);
begin
if DBCtrlGrid1.PanelIndex = Index then
begin
DBCtrlGrid.Canvas.Brush.Color := clTeal;
DBCtrlGrid1.Canvas.Rectangle
(0,0,DBCtrlGrid.Width,DBCtrlGrid.Height);
end;
end;
Using IB_CtrlGrid (this does not work):
procedure TMainForm.IB_CtrlGrid1PaintPanel(IB_CtrlGrid: TIB_CtrlGrid;
RowNum: Integer);
begin
if IB_CtrlGrid1.PanelIndex = RowNum then
begin
IB_CtrlGrid1.Canvas.Brush.Color := clTeal;
IB_CtrlGrid1.Canvas.Rectangle(0, 0, IB_CtrlGrid1.Width,
IB_CtrlGrid1.Height);
end;
end;
Why?
Marlon