问题
The UX designer's call. I am reworking layout for Ready Page to make it similar to Welcome Page as in my drawing:
The two slides above are standard pages. The one on the bottom is reworked Ready Page. How can I reposition all the controls and text labels to accomplish that?
P.S. I accepted the answer from Martin Prikryl and the most important part was the structure from Wizard.dfm.txt. The exact answer was not fully applicable partially due to the sketch above being simplification of the problem with upgrading the installation project to use with Graphic Installer plug-in for Inno Setup.
回答1:
The TWizardForm class has a structure like (.dfm format):
object OuterNotebook: TNewNotebook
object WelcomePage: TNewNotebookPage
object WizardBitmapImage: TBitmapImage
object WelcomeLabel2: TNewStaticText
object WelcomeLabel1: TNewStaticText
end
object InnerPage: TNewNotebookPage
object Bevel1: TBevel
object InnerNotebook: TNewNotebook
...
object ReadyPage: TNewNotebookPage
object ReadyMemo: TNewMemo
object ReadyLabel: TNewStaticText
end
...
end
object MainPanel: TPanel
object WizardSmallBitmapImage: TBitmapImage
object PageDescriptionLabel: TNewStaticText
object PageNameLabel: TNewStaticText
end
end
end
Note how the "Welcome" page is on a different level of the hierarchy than the "Ready" page.
For full details, see Wizard.dfm
To do what you ask for, in the InitializeWizard event function:
- Create copy of the
WizardBitmapImageon theReadyPage; - Shrink the
ReadyMemoandReadyLabelaccordingly (useWelcomeLabel2.Leftand.Widthas a guide).
When the user proceeds to the "Ready" page, in the CurPageChanged event function (with CurPageID = wpReady).
- Hide the
MainPanel(probably alsoBevel1); - Resize the
InnerPageto stretch over the space left by theMainPanel. You can probably just make it as large as its parentInnerPageis.
(And undo this if the user presses "Back").
来源:https://stackoverflow.com/questions/33491406/inno-setup-ready-page-custom-layout