Smooth toggle button persistance

I have a video application that is using a TGridpanel. I use this to resize the 4 panels so when the form resizes they scale accordingly.

I use:

      gridPanel1.RowCollection.BeginUpdate;
      gridPanel1.RowCollection[0].SizeStyle := ssPercent;
      gridPanel1.RowCollection[0].Value     := 40;
      gridPanel1.RowCollection[1].SizeStyle := ssPercent;
      gridPanel1.RowCollection[1].Value     := 10;
      gridPanel1.RowCollection[2].SizeStyle := ssPercent;
      gridPanel1.RowCollection[2].Value     := 40;
      gridPanel1.RowCollection[3].SizeStyle := ssPercent;
      gridPanel1.RowCollection[3].Value     := 10;
      gridPanel1.RowCollection.EndUpdate;
      gridPanel1.ColumnCollection.BeginUpdate;
      gridPanel1.ColumnCollection[0].SizeStyle := ssPercent;
      gridPanel1.ColumnCollection[0].Value     := 50;
      gridPanel1.ColumnCollection[1].SizeStyle := ssPercent;
      gridPanel1.ColumnCollection[1].Value     := 50;
      gridPanel1.ColumnCollection.EndUpdate;

The problem I have  a smooth toggle button on each panel. When I use the above code the smooth button state changes from down to up. Presumably because the panel is being re-drawn.

Is there a way to force the button to stay down or a workaround for this.


Cheers


SteveW

I can't reproduce such problem.

See test project: http://www.tmssoftware.net/public/Project3_5.zip
The first two buttons remain in down state after applying your code.

Sorry I forgot I used :

Gridpanel1.Visible := false;

code...

Gridpanel1.Visible := true;

That still works without any issue here. 
Our test project can be downloaded from: http://www.tmssoftware.net/public/Project3_6.zip


Please provide a test project with which we can reproduce the problem immediately.

I have sent an email with attachment to support@tmssoftware.com subject :

Grid panel problem (forum topic Smooth toggle button persistance )