RobotStudio event

Flexpendant Application - Main view controls "shine through" when displaying second view

I'm developing a Flexpendant app with multiple views. I have the main view (the view created when using the visual studio template) with a button. In the onclick-event of the button, a second view opens up (view2.Show()) with a couple of controls added to it. The second view is added to the controls collection of the first view.

The second view opens up fine but the button of the first view "shines through" so I still can see and click the button. First I thought that the second view had a transparent background but even though I change the background color of the second view to a solid color, red for example, I still see the button in the main view.


What am I doing wrong here?


Thanks!