#include Once "window9.bi"

Sub Settextitemlistview( iGadget As Long, iItem As Long, iSubItem As Long , sText As String) Export 
	
	If iItem = -1 Orelse iSubitem = -1 Then
	
		Exit Sub

	Endif
	
	Dim As Any Ptr listview = Gadgetid(iGadget)
	
	Dim As GtkTreeIter iter
	
	Dim As Any Ptr model = gtk_tree_view_get_model(listview)	
	
	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, iSubItem*2+1, Strptr(sText),  -1)
			
		Endif	
			
		gtk_tree_path_free(path)		
		
	Endif
	
End Sub