#include ONCE "window9.bi"

sub AddListBoxItem ( iGadget as Long , sText as string , iItem as long = -1 ) export
	
	dim as GTKTREEITER iter
	
	dim as GtkListStore ptr liststore
	
	liststore = cast(any ptr , gtk_tree_view_get_model(cast(any ptr,GadgetId(iGadget))))
	
	if iItem = -1 then iItem = &h7FFFFFFF
	
	gtk_list_store_insert(liststore, @iter, iItem) 
	
	gtk_list_store_set(liststore, @iter, 0,  0, 1, strptr(sText),-1)                               	
		
End Sub