#include ONCE "window9.bi"

sub SetListBoxItemText (iGadget as Long , sText as string , iItem as Long) export
	
	dim as GtkListStore ptr liststore
	
	dim as GtkTreeIter iter
	
	dim as Hwnd listbox = GadgetId(iGadget)	

	dim as GtkTreePath ptr path = gtk_tree_path_new_from_indices(iItem, -1)
	
	liststore = cast(any ptr , gtk_tree_view_get_model(cast(any ptr,GadgetId(iGadget))))

	gtk_tree_model_get_iter(GTK_TREE_MODEL(liststore), @iter, path)

	gtk_tree_path_free(path)	
	
	gtk_list_store_set(liststore, @iter, 0,  0, 1, strptr(sText), -1)	

End Sub