Subject | RE: [IBO] Icons in TIB_Grid |
---|---|
Author | Ales Kahánek |
Post date | 2002-09-20T14:27:30Z |
This works fine but when you navigate through the grid from left side to the
right (or vice versa) using the cursor arrow keys, you cannot pass over the
icon cell. I will try to tweak this by the weekend.
Thanks, Ales
right (or vice versa) using the cursor arrow keys, you cannot pass over the
icon cell. I will try to tweak this by the weekend.
Thanks, Ales
> -----Original Message-----
> From: nibler@... [mailto:nibler@...]
> Sent: Friday, September 20, 2002 4:14 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Icons in TIB_Grid
>
>
> Ale,
>
> procedure TForm1.IB_Grid1CellGainFocus(Sender: TObject; ACol,
> ARow: Integer);
> begin
> if ACol=MyPicCol then sysutils.abort
> end;
>
> Cheers,
> Harald
>
>
> Ale¹ Kahánek schrieb:
> >
> > Hi,
> > someone can remember that I was asking about how to draw an
> icon to a
> > TIB_Grid on the basis of information stored in certain
> TIB_Query column. The
> > solution is very easy to implement, thanks to Harald
> Klomann and his demo.
> >
> > There is OnDrawCell event in which you can draw to the cell
> rectangle, icon
> > or text or both. This works well, but when the user clicks
> into the cell and
> > puts the grid into edit mode, the cell shows the original
> value and the icon
> > is not painted.
> >
> > Example: suppose we have numbers stored in a db table which
> are indexes of
> > the icons stored in the TImageList. We do the drawing of
> the appropriate
> > icon in the grid, but after entering the mentioned edit
> mode the icon
> > dissappears and the focused cell shows the index number. I
> tried to find any
> > other event like "OnDrawEditCell" but with no succes. The existing
> > OnDrawFocusedCell does not help in this situation.
> >
> > Do you have any idea?
> > Thank you.
> > Ales