GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 30, 2014 3:54 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ComboBox and Spin entries inside a Treeview with Glade 3.6.7
PostPosted: Sun Jun 02, 2013 11:59 am 
Offline

Joined: Thu May 23, 2013 7:36 pm
Posts: 2
I am using Glade 3.6.7 on Linux and I want to integrate ComboBoxes and Spin Entries inside Treeviews.

For the comboBoxes, I can't show them.

For the spin entries, I can show them and change the values inside them but they aren't saved when I quit the cells. What I did is:

For comboBoxes:
- Add columns and rows for the treeview and assign a combo cellrenderer for the columns where I want to put comboBoxes.
- Create a comboBox model and assign it to the defined columns (I changed "Model" and "Text" properties)

For spin entries:
- Add columns and rows for the treeview and assign a spin cellrenderer for the columns where I want to put spin entries.
- Create an adjustment and assign it to the defined columns (I changed "Adjustment" and "Text" properties)

And here is the code that I used:

Code:
G_MODULE_EXPORT void on_addTreeRowButton_clicked (GtkButton *button, gpointer user_data)
{   
   addTreeEntry(NULL, NULL);
}

void addTriggerClientEntry(gchararray comboBoxValue, guint spinEntryValue)
{
   GtkListStore *liststore;
   GtkTreeIter iter;
   //GtkComboBox *MsgTypeComboBox;

   liststore = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
   gtk_list_store_append(liststore, &iter);
        gtk_list_store_set (liststore, &iter,
                              0, comboBoxValue,
                         1, spinEntryValue,
                                    -1);
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group