#include ONCE "window9.bi"

Sub SetComboBoxItemText(iGadget As Long, sText As String, iItem As Long)
	
	dim as any ptr combo = GadgetID(iGadget)
	
	dim as GtkTreeIter iter
	
	dim as any ptr model = gtk_combo_box_get_model(combo)	
	
	dim as GtkTreePath ptr path = gtk_tree_path_new_from_indices(iItem, -1)

	if path then

		gtk_tree_model_get_iter(cast(any ptr,model) , @iter , path)	
		
		if iter.stamp then
			
			gtk_list_store_set(model, @iter, 1, strptr(sText),  -1)
			
		EndIf	
			
		gtk_tree_path_free(path)		
		
	EndIf	

End Sub