[Gambas-user] Request GridView

ron ronstk at ...239...
Thu May 11 21:42:57 CEST 2006


On Thursday 11 May 2006 18:48, Benoit Minisini wrote:
> On Thursday 11 May 2006 09:08, ron wrote:
> > Do you have time to add GridView.Find(x as integer, y as Integer) ?
> > This is a nice function on ListView, TreeView and ColumnView.
> >
> > I like to have GridView.Find(Drag.X, Drag.Y) too.
> >
> > Groeten uit zonnig Holland
> >
> > Ron
> >
> 
> Please try this patch, and tell me the result.
> 
> GridView.Find(X, Y) will return FALSE if a cell is found, and then 
> GridView.Item will return the cell at the (X, Y) coordinates.
> 
> Regards,
> 

It looks to me perfect working.

My part of code using it now:

    'IF GridViewFind(drag.x, drag.y) THEN RETURN
    IF grdFields.Find(drag.x, drag.y) THEN RETURN <----- :) :)
    row = grdFields.Row
    col = grdFields.Column
  
    lv = drag.source
    kv = Split(lv.Current.Key, "/")
    sDB = kv[0]
    sTBL = kv[1]
    sFLD = kv[2]

    GridColIns(grdFields.Column)
    grdFields[0, col].Text = sTBL
    grdFields[1, col].Text = sFLD

As you an see my gambas code was emulating it and can now be dropped.
The .Row is not used here but I did check by putting it in spare texbox

I did check also the .Item and this is also working as expected.
  row = grdfields.Item.Row
  col = grdfields.Item.Column

Thanks very much, I'm happy


Ron




More information about the User mailing list