[Gambas-user] Re; Grid / Double Click

ron ronstk at ...239...
Fri May 4 06:46:02 CEST 2007


On Thursday 03 May 2007 21:41, Gareth Bult wrote:
> Mmm,
> 
> If you can't determine what the user double clicked on, the event it
> seems is of limited use ...  :(
> 

Yes that idea looks true, but...

> I did a bit of work on the issue I had with being able to display sort
> arrows on the grid header .. I have something "workable" but it's not
> overly pretty.
> The GridView is a great tool but it is missing a few "finishing
> touches".
> 
> Is there a way forward on this, I'm afraid I'm not sufficiently familiar
> with Qt or Gambas' workings to know whether this is a Qr or Gambas
> limitation ?
> 
> I did have a look at the Qt3 docs .. would Qt4 make any difference ?
> 
> Gareth.

When every thing is correct you can use the mouse.x and mouse.y position.
For the column, grid or table view you have row height and column widths
Some calculation with this you can find the cell coordinates where the click 
did happen and take the need actions.
I did this in the past on a grid view to find the cell (row/column)

The only thing that was not possible was if the first visible row was not the
first row of the real rows.
i.e. scrolled in 100 rows and the first visible row is row number 25.

I did ask in the past for a property to be able to get the first visible row
in the grid. (VB does have this property)


Ron




More information about the User mailing list