[Gambas-user] Tableview with vertical Header
Gianluigi
bagonergi at gmail.com
Fri May 17 18:50:34 CEST 2019
Il giorno ven 17 mag 2019 alle ore 17:41 Benoît Minisini <g4mba5 at gmail.com>
ha scritto:
> Le 17/05/2019 à 17:29, Peter Peyotle a écrit :
> > Hello and good evening
> >
> > I use a tableview with a vertical header.
> > Unfortunately, I find no settings for the width of the vertical header
> > and the ability to set the font left-aligned.
> > This is not a problem with a horizontal header and can be set up and
> > read out via the column properties. But what about a vertical header?
> > This does not correspond to the Column value -1 or so.
> >
> > Best regards
> > Klaus-Peter
> >
>
> I guess that this limitation comes from the past, when the GridView was
> native.
>
> Now it should be possible to define the alignment of the row header
> without problem.
>
> Its width can already be defined with the GridView.Rows.Width property.
>
> Regards,
>
> --
> Benoît Minisini
>
Hi Peter,
something like that:
Public Sub Form_Open()
With TableView1
.Rows.Count = 4
.Rows.Width = -1
.Columns.Count = 4
.Rows[0].Text = TextAlign("Coca Cola")
.Rows[1].Text = TextAlign("Seven Up")
.Rows[2].Text = TextAlign("Cervesa")
.Rows[3].Text = TextAlign("Chinotto")
.Header = GridView.Vertical
End With
For i As Integer = 0 To 3
TableView1[i, 0].Text = String(10, "*")
TableView1[i, 1].Text = String(10, "*")
TableView1[i, 2].Text = String(10, "*")
TableView1[i, 3].Text = String(10, "*")
Next
End
Private Function TextAlign(value As String) As String
Return Space(30 - String.Len(value)) & value
End
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190517/7de44da3/attachment-0001.html>
More information about the User
mailing list