Subject Re: [IBO] TIB_Grid: Painting in rest space area
Author Andreas Pohl
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...> wrote:
>
> Andreas wrote:
> > If there is only a small number of rows in grid there is a free/blank
> > region of grid's client area. (See mark in screen shot at [1])
> >
> > What is the best approach to paint in the fixedcol area outside last
> > displayed datarow?
> >
> > I'm using a TIB_Grid so I hope my question is not to much off topic.
> >
> > [1] http://tinyurl.com/yyeb27
>
> Not off-topic at all.
>
>
> I don't recall exactly how that is handled. I know there are numerous
> events that give you customized control over painting.
>
> Are you comfortable digging in the code of IB_Grid.pas to see if you
can get
> a hook where you need it?

I'm trying this since 1998 ;)

Here is my fix (rel.4.3.Aa) maybe is obsolet in later versions:

procedure TIB_CustomGrid.UpdateRowCount;
var
newCnt: integer;
tmpInt: longint;
visRows: integer;
begin
if not FUpdatingRowCount and DataLink.Prepared then
try
FUpdatingRowCount := true;
DataLink.Dataset.BeginCallbackFreeze;
// Pohl : add a line
visRows := VisibleGridRows+1;

HTH.

--
Andreas