[Gambas-user] What exactly does the Clear method in a GridView?
T Lee Davidson
t.lee.davidson at gmail.com
Sat Feb 9 02:17:58 CET 2019
On 9/2/18 2:35 PM, Benoît Minisini wrote:
> Le 02/09/2018 à 20:33, Benoît Minisini a écrit :
>> Le 02/09/2018 à 19:20, Jorge Carrión a écrit :
>>> The help says that "Clear the grid static contents".
>>> What is this static content composed of?
>>> Rows and columns size? Cell content? position on screen?
>>>
>>> Best Regards
>>>
>>
>> Wait a minute, I'm looking into the source code... :-)
>>
>
> It clears the contents that you defined explicitly (not what you draw through the Data event) and that is stored inside the
> GridView control. And it sets the rows count to zero. But it keeps the columns.
>
GridView.Clear does not appear to set the rows count to zero.
Did I misunderstand this, or has something changed since a *year* ago?
' Gambas class file
Public Sub Form_Open()
GridView1.Rows.Count = 10
GridView1.Columns.Count = 2
For x As Integer = 0 To GridView1.Rows.Max
For y As Integer = 0 To GridView1.Columns.Max
GridView1[x, y].Text = x & ":" & y
Next
Next
End
Public Sub Button1_Click()
GridView1.Clear
GridView1.Refresh ' Makes no difference
Debug GridView1.Rows.Count
End
___
Lee
More information about the User
mailing list