[Gambas-user] How to auto-adjust GridView column widths?

Benoît Minisini gambas at ...1...
Sun Jan 22 19:55:47 CET 2012


Le 22/01/2012 19:42, M. Cs. a écrit :
> Public Sub gv_Data(x As Integer, y As Integer) ' Fills the GridView
> with the querry results
> Dim i As Integer
> Dim szine As String
> If ((x Mod 2) = 0) Then
>    szine =&E5E5E5&
> Else
>    szine =&FFFFFF&
> Endif
>
> Select Case y
> Case 0
>   gV.Data.Text = Keress.Name(x)
>   gV.Data.BackGround = szine
> Case 1
>   gV.Data.Text = Keress.Volm(x)
>   gV.Data.BackGround = szine
> Case 2
>   gV.Data.Text = Keress.Road(x)
>   gV.Data.BackGround = szine
> Case 3
>   gV.Data.Text = Keress.Size(x)
>   gV.Data.BackGround = szine
> Case 4
>   gV.Data.Text = Keress.When(x)
>   gV.Data.BackGround = szine
>
>   End Select
>
> End
>
> Tell me just where to put, and how. I've tried many versions but
> always resulting with Stack overflow error.
> Thanks!
>
> Csaba
>

Anywhere not in the Data event handler, as adjusting the column width 
will call it recursively.

-- 
Benoît Minisini




More information about the User mailing list