#include ONCE "window9.bi"

sub DeleteButtonToolBar (iHwndToolBar As Integer , iIndex as long) export
	
	dim as any ptr iButton = gtk_toolbar_get_nth_item (cast(any ptr,iHwndToolBar) , iIndex)
	
	if iButton = 0 then exit sub
	
	dim as ListT ptr pTemp = pGlobalTypeWindow9->ListToolBar->firstnode
	
	while pTemp
		
		if pTemp->anyTwoData = iButton then
			
			pGlobalTypeWindow9->ListToolBar->removeNodeSub(pTemp->anyOneData)
			
			exit while
			
		EndIf
		
		pTemp = pTemp->nextNode
		
	Wend
	
	gtk_widget_destroy(iButton)
	
End Sub