> ... how to insert text into other columns than column 0.
> 
> ColumnView1.Add("key1", "Text1") only adds text to the leftmost column, 
> the one that can be shown like a treeview. (I don't need that treeview 
> feature, just several columns.) And how do I add text to column 1, 2
> etc.?

Here is an example. I am using a ColumnView called ProductsList

In the Form_Open do, I do this:

  ProductsList.Columns.Count = 4
  ProductsList.Header = 1 'show header
  ProductsList.Mode = Select.Single
  ProductsList.Columns[0].Text = "ID"
  ProductsList.Columns[1].Text = "Act"
  ProductsList.Columns[2].Text = "Des"
  ProductsList.Columns[3].Text = "Description"


The to populate the entire Columnview, here is part of the code used:
  ...
  ctr = 1
  FOR EACH Result
    ProductsList.Add(ctr, Result!product_id)
    ProductsList[ctr][1] = Result!actual_stock
    ProductsList[ctr][2] = Result!desired_stock
    ProductsList[ctr][3] = Result!description
    INC ctr
    IF ctr > 1000 THEN BREAK
  NEXT
  ...


So as you can see, your "Add" adds an entire row. The you can use array
identifiers to address and set the column values. Probably like this:
 ColumnView1["key1"][1] = "Text A"
 ColumnView1["key1"][2] = "Text B"


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to