Hwo do i hide an item lists v scroll bar?

Godot Version

4.6

Question

so i have myself an item list, and i want to hide its scroll bar whenever this function is called, however the damm thing has an ego and LOOOOVES the attention it gets when i try to hide it for the 30th time, ive looked around, tried everything, even asked both chat gpt AND gemini, bu to no avail. please help me kill this thing for good, its the only thing in this function that doesnt work. please​:pleading_face:

func _on_nomorechances() -> void:
	$chancelabel.disabled=false
	createcard(awnser)
	for item in itemlist.all_items:
		$ItemList.set_item_disabled(indexx,true)
		indexx+=1
		if indexx >= $ItemList.item_count:
			indexx=0
	$ItemList.get_v_scroll_bar().hide()
	
	$LineEdit.editable=false

Sorry, I don’t know how to hide the scrollbar properly.

But you may be able to achieve what you want by assigning the scrollbar custom styles, with content margins set to 0, then set its size to 0 as well.

$ItemList.get_v_scroll_bar().hide() works on my end.
I guess the for loop never finishes, try moving the hide code on the top of the function.