markus_ja
markus_ja

Reputation: 2951

Bring Control to Front when Selected in the Structure Pane

I would like to build a Wizard component, where I can guid the user through different pages. When the last page is reached, an action is performed. That component should work similar as the TPageControl, where I can create sheets at design-time. Creating that 'sheets' is already done, but my problem is, that the last added sheet is always on top of the other sheets, and I cannot select another one anymore (which are behind). In the TPageControl component, I can select a sheet in the Structure Pane, and it comes to the front, where can I put controls on it.

And this is my question: How can I bring a control (my wizard sheet) to the front, when it is selected in the Structre Pane?

Upvotes: 1

Views: 896

Answers (1)

markus_ja
markus_ja

Reputation: 2951

I have to override the TWinControl.ShowControl function. That function is fired when you click in the structure pane on the child control. Then, I just need to invoke the BringToFront function of that child.

Upvotes: 1

Related Questions