Subject RE: [IBO] New file uploaded to IBObjects
Author Alan McDonald
Json,
Have you had a chance to look at my example app? WRT the CtrlGrid painting?
Alan

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Alan McDonald
> Sent: Friday, 21 September 2007 9:24 PM
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] New file uploaded to IBObjects
>
>
> > > Hopefully you can take a look at this Jason.
> > > The OnPaintPanel event of IB_CtrlGrid is practically useless in
> > actioning
> > > changes to the currently selected row and causes unreliable
> re-draws to
> > > other rows as you scroll.
> > > This example uses the latest version of IB_CtrlGrid (with mouse wheel
> > > ability) but the same behaviour is visible in previous version
> > 4.6 and 4.7
> > > Alan
> > >
> >
> > To the best of my digging:
> > TIB_CtrlPanel.PaintWindow calls
> > PaintPanel( DataLink.BufferRecord );
> > for each row in the grid, equivalent to
> > TDBCtrlPanel.PaintWindow calling
> > PaintPanel(FDataLink.ActiveRecord);
> >
> > BUT whereas DB:
> > function TDataLink.GetActiveRecord: Integer;
> > begin
> > if DataSource.State = dsSetKey then
> > Result := 0 else
> > Result := DataSource.DataSet.FActiveRecord - FFirstRecord;
> > end;
> >
> > returns records current in the grid, 0, 1, 2 etc (zero based from
> > first grid
> > row to RowCount), in IB_Components
> >
> > function TIB_DataLink.GetActiveRecord: longint;
> > begin
> > if Assigned( Dataset ) then begin
> > Result := Dataset.RowNum;
> > end else begin
> > Result := 0;
> > end;
> > end;
>
> sorry - I meant
> function TIB_DataLink.GetBufferRecord: longint;
> begin
> if Assigned( Dataset ) then begin
> Result := Dataset.BufferRowNum;
> end else begin
> Result := 0;
> end;
> end;
>
> BufferRowNum returns the bottom rownum in the buffer on it's first call.
>
> >
> > returns the dataset RowNum but this runs in the order:
> > Lastrow in Grid, second, then last again (i.e. for a 3 row
> grid: 3, 2, 3)
> > It's not zero based and it returns the last row first and never
> > the first in
> > the first instance (draw of the grid). When you scroll to or select the
> > second row, the calls are 1, 3, 3 and finally 1,2,3 for the last
> > of a 3 row
> > grid. Move the cursor up again and you get 1, 3, 3 and 3, 2, 3
> at the top.
> > Alan
> >
> > > > Hello,
> > > >
> > > > This email message is a notification to let you know that
> > > > a file has been uploaded to the Files area of the IBObjects
> > > > group.
> > > >
> > > > File : /CtrlGridBugs.zip
> > > > Uploaded by : metaalan <alan@...>
> > > > Description : IB_CtrlGrid bugs in returning RowNum (index) of row.
> > > >
> > > > You can access this file at the URL:
> > > > http://groups.yahoo.com/group/IBObjects/files/CtrlGridBugs.zip
> > > >
> > > > To learn more about file sharing for your group, please visit:
> > > > http://help.yahoo.com/help/us/groups/files
> > > >
> > > > Regards,
> > > >
> > > > metaalan <alan@...>
>
>
>
>
> __________________________________________________________________
> _________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________________
> _________
> http://www.ibobjects.com - your IBO community resource for Tech
> Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Yahoo! Groups Links
>
>
>
>