Board index » delphi » paint to dbctrlgrid

paint to dbctrlgrid

hi guy,

May I know is there anyway to change the font color of the selected(only the
selected)  panel in 'DBCTRLGRID' ? I know how to do it in dbgrid .. but it
seem can not or I do not know how in dbctrlgrid ...

Thank in advance

regards,
lee

 

Re:paint to dbctrlgrid


Quote
"lee" <leebanc...@hotmail.com> wrote in message

news:3daf89aa@newsgroups.borland.com...

Quote
> hi guy,

> May I know is there anyway to change the font color of the
selected(only the
> selected)  panel in 'DBCTRLGRID' ? I know how to do it in dbgrid
.. but it
> seem can not or I do not know how in dbctrlgrid ...

You can do it Quasi's way or you can just use the SelectedColor
property of the TDBCtrlGrid to set the active panel's color.

Woody (TMW)

Re:paint to dbctrlgrid


Thank for your reply. The coding only work for '1' selected panel to be
highlighter. What if I want to highlight all, include current active panel
and those I have been click on previously.

What I mean is highlight all the panel that i have been selected (or click
on) previously ... to make it look like i have done multiselect ...

Thank in advance

Quote
"Quasidata" <quasidataATquasidataDOTcom> wrote in message

news:3dafbc0e@newsgroups.borland.com...
Quote
> Hello lee,

> procedure TForm1.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid;
>   Index: Integer);
> begin
>   if Index = DBCtrlGrid1.PanelIndex then
>     DBText1.Font.Color := clRed
>   else
>     DBText1.Font.Color := clWindowText;
> end;

> --
> Andrei Fomine    www.quasidata.com
> DbAltGrid - multi-line layout, RTF and graphics of any kind in DBGrid.
> Transfer@once - full-blown clipboard and drag-and-drop data transfer
> to/from any control in many formats, including ones native to MS Office.

> "lee" <leebanc...@hotmail.com> wrote in message
> news:3daf89aa@newsgroups.borland.com...
> > hi guy,

> > May I know is there anyway to change the font color of the selected(only
> the
> > selected)  panel in 'DBCTRLGRID' ? I know how to do it in dbgrid .. but
> it
> > seem can not or I do not know how in dbctrlgrid ...

> > Thank in advance

> > regards,
> > lee

Other Threads