Re: How can I find out the text of an entry in a ComboBox



On Mon, 2005-12-12 at 10:58 -0500, yinglcs aim com wrote:
> How can I find out the text of an entry in a ComboBox if I only know 
> the index of that entry?

Try:
	gtk_combo_box_get_active_text ();

Or something like:

	model = gtk_combo_box_get_model (combobox);
	path = gtk_tree_path_new_from_indices (0, -1);
	gtk_tree_model_get_iter (model, &iter, path);
	gtk_tree_model_get (model, &iter, 0, &str, -1);
	gtk_tree_path_free (path);
	g_free (str);
	
-- 
Regards,
Martyn




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]