Move main menu to different form? |
|
Re: Move main menu to different form? |
|
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> You should be using a Frame for that instead of a Form. Then you can move
> the Frame around as needed. Put the Frame on your MainForm, move it to the
> TabSheet, move it back, etc.
We use frames when we know in advance we're going to host a tool different ways. Putting this tool on a tab sheet wasn't expected until just recently.
> Have you considered using Actions instead? Then you can put a TActionMainMenuBar
> or TActionToolBar on the two Forms and have them share the same TAction objects.
Another good idea going forward. We haven't used Actions at all, though I've used Qt's version of them quite a bit.
Was hoping for something I could whip out this morning. However, thanks for reminding me about Actions; I'm going to finally take some time and learn how to use them.
Thanks as always Remy.
|
Re: Move main menu to different form? |
|
Hello Dean,
> Is there a straightforward way to re-parent a TMainMenu from one form
> to another?
> I need to host a form on a tabsheet in a different form.
You should be using a Frame for that instead of a Form. Then you can move
the Frame around as needed. Put the Frame on your MainForm, move it to the
TabSheet, move it back, etc.
> The form where the tab sheet is doesn't have a main menu yet; I
> want the first form's main menu to be applied to the tabsheet's form.
Have you considered using Actions instead? Then you can put a TActionMainMenuBar
or TActionToolBar on the two Forms and have them share the same TAction objects.
--
Remy Lebeau (TeamB)
|