Hidding a Custom Box based on Tab View Selection

My AppleScript Application in Xcode contains Tab View component with multiple tabs.

Two buttons are linked to the selectNextTabViewItem and selectPreviousTabViewItem respectively to control the switching from one tab to the next (and back).

Here is where I am stuck:
I do not want the PREVIOUS button to show if the first tab is selected (obviously it makes no sense to have a back button on the initial tab). The buttons sit within a ‘Custom Box’ (Xcode component), which has a Drawing: Hidden checkbox (as per the Attributes Inspector) that is currently unchecked, so ideally I am looking for a way to toggle this hidden property depending on the selection of the tab, as the button will also become invisible.

Note: The buttons sit below the tab view component, not inside it, hence their visibility is independent of the tab selection. I figured it would be smarter to do it this way instead of two buttons in every tab to control the same thing.

From my research, I have found another article from 10 years ago, describing something similar using the didSelectTabViewItem function. However, its documentation is very vague in my opinion.
I would really appreciate your help in guiding me to the appropriate solution

Make sure your script is the tab view’s delegate (make the connection), and then add a handler something like this:

on tabView:tabView didSelectTabViewItem:tabViewItem
	if (tabViewItem's isEqualTo:(tabView's tabViewItemAtIndex:0)) as boolean then
		-- the first tab has been selected...
	end if
end tabView:didSelectTabViewItem:

Shane Stanley, it worked like a charm! Thank you for the hint, that’s a very elegant way of accomplishing it.