[Gambas-user] Upper left cell in a TableView

Fabien Bodard gambas.fr at ...626...
Tue Aug 9 22:22:35 CEST 2016


Really more shorter and more sure.



' Gambas class file

Private OBS As Observer


Public Sub Form_Open()

  'need an observer to get the draw event after the array drawing
  OBS = New Observer(TableView1.Children[0], True) As "OBS"

  TableView1.Rows.Count = 10000
  TableView1.Columns.Count = 6

End

Public Sub OBS_Draw()

    Draw.ClipRect = Rect(0, 0, TableView1.Rows.W,
TableView1.Columns.H) 'set the clippin region to the upper left cells
size
    Draw.Text("toto", 0, 0, TableView1.Rows.W, TableView1.Columns.H,
Align.Center) 'Draw the text path

End




More information about the User mailing list