[Gambas-user] Tableview question

Fabien Bodard gambas.fr at ...626...
Sun Oct 25 18:10:53 CET 2009


With a form and a tableview

I hope you understand more, in the _Save Event, you validate the
entered value and do what you want such as adding a new row

' Gambas class file




PUBLIC SUB Form_Open()

  TableView1.Rows.Count = 3
  TableView1.Columns.Count = 2

  TableView1[0, 0].Text = "tic"
  TableView1[0, 1].Text = 1
  TableView1[1, 0].Text = "tac"
  TableView1[1, 1].Text = "2"
  TableView1[2, 0].Text = "toes"
  TableView1[2, 1].Text = 3
END

PUBLIC SUB TableView1_Click()
  IF TableView1.Column = 1 THEN RETURN
  TableView1.Edit

END

PUBLIC SUB TableView1_Save(Row AS Integer, Column AS Integer, Value AS String)
  IF Value = "" THEN
    Message.Error("You need to say something")
    RETURN
  ENDIF
  TableView1[Row, Column].Text = Value

END


2009/10/25 Fabien Bodard <gambas.fr at ...626...>:
> on the _data event version or gridview mode ?
>
>
> 2009/10/24 richard terry <rterry at ...1946...>:
>> I've need to use the table view to allow user to edit/add new cells
>>
>> Despite reading Doc's and looking at the  examples in the IDe I'm no closer to
>> getting the concept of how the thing works, so I wonder if anyone could
>> explain its use in simple terms and show me a simple sample of how to allow;
>> *user to click on cell > enter > add information > exit > value appearing in
>> the cell, adding new row etc.
>>
>> In the meantime I'll pore over the gambas IDE sourcecode and try again!
>>
>> Regards
>>
>> richard
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>




More information about the User mailing list