Hi,
I want to write a set of wrapper, like C++ Builder/Delphi VCL, for db
access with gtk widgets.
I need to create a class for data display and I choose the TreeView used
as listview.
I have created the DBListViewColumn class that contain the table field
name, title and other informations for data display.
The DBListView display 2 columns: the db field name, the data type,
the column title
and other things
column1 = DBListViewColumn.new(“customer_name†, String, “Name”, …)
column2 = DBListViewColumn.new(“customer_number†, Integer, “Cust.
Number”, …)
columns = Array.[](column1, column2)
The DBListView constructor receive 2 parameter the DBQuery used to
select data from db and the array contain the columns definitions
listview = DBListView.new(query, columns)
When the query is executed the DBListStore creates the columns and
display query data.
The Gtk::ListStore object is created in the DBListStore.queryExecuted()
method and the problem is: how I can pass my columns data types to the
Gtk::ListStore constructor?
In the ruby-gnome tutorials Gtk::ListStore is always created with a
fixed number of columns, but I have a variable quantity of them.
Can anyone help me?
Thanks in advance, Emiliano.