|
| Wizard |
 |
Sat, 17 Nov 2007 17:28:52 +090 |
This is a wizard format that is not completely finished but works well
despite a simpol issues at my end and with parent/child window
relationships.
The demo is fairly self explanatory with as many comments splattered around
as time permits.
I have done this from C:\ as they are not the originals and changing all
the project paths might be a bit much for some. If you unzip to another dir
you will need to change the project settings but the demowizard.smp should
run from the ide or using smprun32
There is a collection.sml included but I haven't added the project for that.
I thought there was enough to look at as is and I don't have the time to
clean it up.
Cheers, John
|
| Post Reply
|
 |
 |
| Re: Wizard |
 |
Tue, 20 Nov 2007 14:49:37 +090 |
"John Roberts" <remjohnr@iinet.net.au> wrote in message
news:fhm8on$jv3$1@ipx22096.ipxserver.de...
> This is a wizard format that is not completely finished but works well
> despite a simpol issues at my end and with parent/child window
> relationships.
> The demo is fairly self explanatory with as many comments splattered
> around as time permits.
> I have done this from C:\ as they are not the originals and changing all
> the project paths might be a bit much for some. If you unzip to another
> dir you will need to change the project settings but the demowizard.smp
> should run from the ide or using smprun32
> There is a collection.sml included but I haven't added the project for
> that. I thought there was enough to look at as is and I don't have the
> time to clean it up.
> Cheers, John
Now that I have a couple of spare moments for a bit more explanation.
The wizard still needs a standard welcome form as per MS specs - I was
halfway though this:
http://msdn2.microsoft.com/en-us/library/ms737997.aspx
and with forms a header pane:
http://msdn2.microsoft.com/en-us/library/ms737969.aspx.
but these can be custom generated in the forms and added to the wizard's
form collection for display.
I could have set the projects up so that the wizard project's target pointed
to a "lib" dir that all lib user projects targeted and other projects
accessed when linking but I was under pressure to be elswhere at the time.
Other things in the demo project like when calculating the width of the grid
columns I would usually get the scrollbar width from the system rather than
hard coding it. I also use a font wrapper that allows changing one of more
attributes of a font rather than recreating it. This can be added to the
application object and passed around or simply use getdefaultfont() from the
simpol usersyslib.
The building of the 3 forms in the demo and recovery of the values from them
via the wizard is fairly rudimentary and just an example rather than "the
way" to do it but it should give some ideas. Rather than use the name of
the
textbox to store a field name or other data, a field type or a tags object
could be attached to the "__" property of the control/textbox and
various
parameters stored in there.
There are several workarounds in there. Some are to avoid the wizard being
hidden behind the demo main window.
Note that when you display the wizard using the main win as a parent, it
then becomes a child window of the parent and the underlying form shows
through when clicked on. To workaround this the main demo win form could be
removed from its container and the wizard would then become a pane without
thick borders in the demo main win. This might be useful sometimes but I
will leave it up to you.
When a form is added to the form window a textbox is added to allow tabbing
between the button window and the form window as there is no formal
setactive method for windows as yet other than making them invisible and
then visible again.
Ideally the wizard should be a modal dialog but there is currently no
facility in simpol to add panels/child windows to a dialog and a window
cannot be made modal. It is possible in wxWidgets but whether the form
implementation in simpol will allow this is unknown to me. Like most gui
controls a form is probably a window and in theory sizeable but in practice
perhaps not. My workaround is to set the main win invisible as you will see
when running it. This is not ideal but does for now.
I posted the wizard as an example of how a more complex type can be designed
and implemented in a basic example app.
John
|
| Post Reply
|
|
|
|
|
|
|
|
|
|