Window sections can be collapsed, e.g. ENTER "=HEADER_COLLAPSE"
Is there a way of checking if a window section is collapsed or expanded?
I can probably search for fields which would normally be present in the expanded state but this is not very reliable. Is there a system variable for the enjoy window status?
There is no special status variable available. A foolproof way is to look at the pushbutton that collapses the window section, e.g.:

// Header data shown?

if P[Hide header data]

...

endif