* BUG: GridView.RowAt() and GridView.ColumnAt() now take the headers into 
  account.


git-svn-id: svn://localhost/gambas/trunk@4039 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2011-08-25 21:59:14 +00:00
parent de44c3803f
commit 6096f90634

View file

@ -1125,6 +1125,8 @@ int gGridView::rowAt(int y)
int bpos=-render->getOffsetX(); int bpos=-render->getOffsetX();
int bc; int bc;
y -= headerHeight();
for (bc=0; bc<render->rowCount(); bc++) for (bc=0; bc<render->rowCount(); bc++)
{ {
if ( (bpos<=y) && ( (bpos+render->getRowSize(bc)))>=y ) return bc; if ( (bpos<=y) && ( (bpos+render->getRowSize(bc)))>=y ) return bc;
@ -1139,6 +1141,8 @@ int gGridView::columnAt(int x)
int bpos=-render->getOffsetY(); int bpos=-render->getOffsetY();
int bc; int bc;
x -= rowWidth();
for (bc=0; bc<render->columnCount(); bc++) for (bc=0; bc<render->columnCount(); bc++)
{ {
if ( (bpos<=x) && ( (bpos+render->getColumnSize(bc)))>=x ) return bc; if ( (bpos<=x) && ( (bpos+render->getColumnSize(bc)))>=x ) return bc;