Redraw problems when manipulating a listbox

Seems to me I don’t get the refresh commands correctly.

I have locked a listbox in all 4 directions so it grows with the window and a segmented control above it to change its design: In one view, it’s only one column visible without a header, whilst the other view option shows three columns plus header.
Switching initially works as intended, without any need to invalidate/refresh. When I resize the window and switch again, it happens from time to time(!) that the header of the second view option is not shown, instead the old first row of the one-column view stays visible until I resize the window again.
Could you tell me what I got wrong?

The code of the segmented control is

dim segment as SegmentedControlItem=me.items(0)
if segment.Selected then // Einzelzeilenansicht
PhoneBookListbox.ColumnWidths=“100%,0%,0%,0%,0%”
PhoneBookListbox.HasHeading=false
else
PhoneBookListbox.ColumnWidths=“35%,35%,30%,0%,0%”
PhoneBookListbox.HasHeading=True
end if
PhoneBookListbox.Invalidate(true)
MainWindow.Refresh // thinking that refreshing the listbox only would not be enough – but makes no difference if the whole window or just the listbox gets redrawn
UpdateFound1(true) // this is to fill the listbox