Alarm Status Table - Refresh Inspect panel with selected alarm

I want to be able to refresh the alarm inspect panel with newly selected alarms (instead of remaining on the alarm selected originally when the panel was first opened).

I have this working, but I’m just toggling the inspect toggle button itself, which closes and re-opens the panel on alarm selection change. I’d rather not have to close the panel and instead just update the info in the panel itself.

Can I get some help with how I would do this?

FWIW this is what I have currently:

def refreshInspectPanel(alarmObj):
	'''
	Description:
	Refreshes the alarm inspect panel info with the selected alarm info.
	
	Usage:
	Call on the 'selectedAlarms' property change
	E.g.
if event.propertyName == 'selectedAlarms':
	shared.components.AlarmStatusTable.refreshInspectPanel(event.source)
	'''
	alarmObjInspectButton = alarmObj.getComponent(0).getComponent(1).getComponent(1).getComponent(0)
	
	#If the inspect button is 'selected' (i.e. the panel is shown), then toggle the button off and back on again to refresh the alarm being shown (dodgy refresh)
	if alarmObjInspectButton.isSelected():
		alarmObjInspectButton.doClick()
		alarmObjInspectButton.doClick()