Board index » delphi » "Wizard" style forms

"Wizard" style forms

Hi. For an application I am writing, I have three forms in a "Wizard"
style, ie. with Next and Previous buttons, which show, obviously, show
the next and previous form.

Is there any way to easily show the forms with the same height, width,
and screen co-ordinates? At present, I pass these values into a
procedure in the forms, but this seems like a pretty roundabout way of
doing it. Maybe there's a show procedure I don't know about, which,
shows the form with the same coordinates etc. as the calling form?

Any help would be appreciated.

 

Re:"Wizard" style forms


Why not use a single form and a TPageControl and set the TabVisible property
of the TTabSheet's to False ?

"Paul M" <nos...@thank.you> schreef in bericht
news:98s3gtcubrsqe1j0upl7vdpm7togdioe73@4ax.com...

Quote
> Hi. For an application I am writing, I have three forms in a "Wizard"
> style, ie. with Next and Previous buttons, which show, obviously, show
> the next and previous form.

> Is there any way to easily show the forms with the same height, width,
> and screen co-ordinates? At present, I pass these values into a
> procedure in the forms, but this seems like a pretty roundabout way of
> doing it. Maybe there's a show procedure I don't know about, which,
> shows the form with the same coordinates etc. as the calling form?

> Any help would be appreciated.

Re:"Wizard" style forms


Hi Paul,

Quote
> Is there any way to easily show the forms with the same height, width,
> and screen co-ordinates? At present, I pass these values into a
> procedure in the forms, but this seems like a pretty roundabout way of
> doing it. Maybe there's a show procedure I don't know about, which,
> shows the form with the same coordinates etc. as the calling form?

Why don't you use the TPageControl with TTabSheets for every 'window', and
set the ActivePageIndex to switch between the tabs? Remind to set the
TabVisible property of the TTabSheet to False at runtime to hide the tab.

- daniel

Re:"Wizard" style forms


Quote
"Paul M" <nos...@thank.you> wrote in message

news:98s3gtcubrsqe1j0upl7vdpm7togdioe73@4ax.com...

Quote
> Hi. For an application I am writing, I have three forms in a "Wizard"
> style, ie. with Next and Previous buttons, which show, obviously, show
> the next and previous form.

> Is there any way to easily show the forms with the same height, width,
> and screen co-ordinates? At present, I pass these values into a
> procedure in the forms, but this seems like a pretty roundabout way of
> doing it. Maybe there's a show procedure I don't know about, which,
> shows the form with the same coordinates etc. as the calling form?

> Any help would be appreciated.

I agree with "M.H." and Daniel that a PageControl is the best choice.

Alternatively, if you're using Delphi 5 you can use TFrame instead of TForm.
The frames are basically the same as forms, but can be embedded on other
frames and forms (or used like normal forms), giving a lot of flexibility in
placing them.

An app I'm working on right now involves a lot of wizards for various tasks,
and I'm using a combination of frames and forms to great success.

--
Duckman: Did I ever tell you my Dad's last words to me?
Cornfed: "Careful, son, I don't think the safety is on."
Duckman: Before that!

Re:"Wizard" style forms


Thanks heaps, guys. That solution is much better!

B. Garvelink: I'm actually using Delphi 4, but thanks for your
response, anyway.

Other Threads