[Gambas-user] Xview selection cursor info

Fabien Bodard gambas.fr at ...626...
Tue Dec 1 18:52:28 CET 2009


2009/12/1 Jean-Yves F. Barbier <12ukwn at ...626...>:
> Fabien Bodard a écrit :
>
> @#&!§ Murphy: the only one I didn't test:(
>
>> and the third question ????? i don't understand what you want ?
>
> this is Q3
>>  first visible row :
>>
>> irow = GridView1.RowAt(1)
>>
>> LastVisible Row :
>>
>> irow = GridView1.RowAt(GridView.ClientHeight - 1)
>
> this Q3 enhanced
>> But it don't say if the Row is fully visible...
>>
>> You can test a cell
>>
>> For top :
>>
>> if GridView[iRow,0].Y <0  and iRow+1 < Gridview.Count then iRow+=1
>>
>> For bottom
>>
>> if GridView[iRow,0].Y + GridView[iRow,0].Height >
>> GridView.ClientHeight and GridView.Count >1 then iRow -= 1
>
> in Q1, I wanna make the selection cursor (bar) appear @ windows opening
> on the first row (otherwise I must click on a row for it being visible)

simple :)
GridView1.Row = 0

(it work I've tested it


> in Q2, I wanna know what is this cursor position (if it is visible)
> as row-into-the-visible-area (indian cursor)
>

http://gambasdoc.org/help/comp/gb.qt/.gridviewcell/ensurevisible?v3

GridView[iRow,0].EnsureVisible



>> Voila Jean-Yves
>
> Thanks Fabien
>
>> 2009/11/30 Jean-Yves F. Barbier <12ukwn at ...626...>:
>>> Hi,
>>>
>>> On a tableview, I need:
>>> * Make the selection cursor to appear on 1st line at opening,
>>> * Selection cursor's position (row) into the grid,
>>> * 1st & last rows visible into the grid
>
> --
> Reporter:   "How did you like school when you were growing up, Yogi?"
> Yogi Berra: "Closed."
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list