Franz
Franz

Reputation: 2049

hide UI components at RUN TIME , design issue

on a form I need a first set of UI controls at process start, later I only need a second set of components. I put the set for process set #1 on a first panel , after finish process step #1 I start to hide panel #1, is ther any better way from UI design guide lines ?

Upvotes: 0

Views: 219

Answers (2)

David Heffernan
David Heffernan

Reputation: 613382

Using panels like you describe is a very common and very respectable way to proceed. Nothing wrong with doing it that way.

Another often used idiom is a page control with hidden tabs. So, make a page control. Add two tab sheets. Set TabVisible to False for both tab sheets. Then at run time set the ActivePage property of the page control to specify which page is shown to the user.

The page control approach is really rather similar to using panels. It's perhaps marginally easier to work with at design time, but much comes down to personal preference.

Upvotes: 2

Remy Lebeau
Remy Lebeau

Reputation: 597385

I would use Frames instead of Panels. You can design Frames at design-time just like Forms, and then create instances of your Frames at run-time as needed. So create your first Frame (you can even place it on the Form at design-time) and then at run-time, when ready you can destroy the first Frame instance and create an instance of the second Frame.

Upvotes: 2

Related Questions