[Gambas-user] Alignment or Gridview problem?

Dominique SIMONART simonart.dominique at ...11...
Thu Jan 8 18:59:55 CET 2009


Hi everybody,

Happy new year, ...

Here are two little screen captures to show my problem.
In the Bad.png, look at the width of the Gridview, that ends with +64
In the Good.png, look the same line that ends with +65. This is the
unique difference,
but what a different effect!
In fact, I don't need the extra width at all. If you change Align.Center
by Align.Left, all is OK with +2
(it doesn't work with Align.Right however)

In case you want to test, I add the whole project below
(Open Suse 11.0 / KDE 3.5 / QT / Gambas 2.8)

' Gambas class file

PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()
DIM i, j AS Integer

WITH GridView1
  .X = 2
  .Y = 2
  .Columns.Count = 3
  .Rows.Count = 10
  .Columns.Width = 40
  .Rows.Height = 25
  .Width = .Columns.Count * .Columns.Width + 64
  .Height = .Rows.Count * .Rows.Height + 2
  FOR i = 0 TO 9
    FOR j = 0 TO 2
      GridView1[i, j].Alignment = Align.Center
      GridView1[i, j].Text = Hex$(i, 2) & "." & Hex$(j, 2)
    NEXT
  NEXT
END WITH
END

PUBLIC SUB mnuQuitter_Click()
  ME.Close
END

Thanks for any help
Dominique Simonart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bad.png
Type: image/png
Size: 37340 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090108/f1749db8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Good.png
Type: image/png
Size: 38386 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090108/f1749db8/attachment-0001.png>


More information about the User mailing list