#include ONCE "window9.bi"

function GetScrollGadgetRange(iGadget as Long , iFlag as Long) as Long export
	
	dim as any ptr ScrollBar = GadgetID(iGadget)
	
	if iFlag = 0 then 	
		
		return gtk_adjustment_get_lower(cast(any ptr, g_object_get_data( ScrollBar , "ScrollADJ")))
		
	else
		
		return gtk_adjustment_get_Upper(cast(any ptr, g_object_get_data( ScrollBar , "ScrollADJ")))
		
	EndIf	
	
End Function