Reputation: 3137
As you know there is a new component called TMultiView that can be user as navigation drawer if you set the mode to Drawer
. Let's say that I have a drawer with 5 buttons inside and each of them, when clicked, shows in the main form a particular layout.
I was thinking that I could add to my form a lot of TLayout
and set their visibility to false. Then, when I click in a button of the Drawer, I set the respective visibility to true/false.
I am not sure if this is a good way to structure the app. Do you have any suggestion?
Upvotes: 2
Views: 1323
Reputation: 105
One approach is to place a TabControl on the form. As you have 5 buttons and want 5 different "layouts" you would add 5 tabs to the TabControl. On each tab place a TLayout.
At design time it is straight forward to design each of the layouts.
At run time switch to the appropriate layout.
Upvotes: 2