[Gambas-user] Request: TableView cell offset

ron ronstk at ...239...
Tue Feb 10 21:48:37 CET 2004


Add to subject.

I found in qtable.h

virtual int columnWidth.....
virtual int rowHeight.........
virtual int columnPos(int col).......
virtual int rowPos(int row)........
virtual int columnAt (int x) const;
virtual int rowAt(int y) const;

This is in a public section of QM_EXPORT_TABLE. QTable : public QScrollView
It looks to me you already implemented the first 4.
The last two should be nice to have too.
I asume QT keeps track where x and y are in the viewport on a scrolled 
tableview to get the real row/column for the whole table.
This is excact what I want, mouse down on a cell and get the row and column id
Even the same names can be used, the do exact the name say's.

Can you provide me a hint where to add in the source. Maybe a reference to 
file where i can find code part as template. I will try itt myself to add and 
if succes I can send it to you as contribution for gambas. 
Good way to learn a bit of Gambas C, your macro's as GamC language :)

P.S. 
The ScrollView in gambas has .ScrollX .ScrollY, may be posible TableView can 
have it to.

---
Ron Onstenk





More information about the User mailing list