From: Phil E. <ph...@li...> - 2009-04-20 07:51:48
|
Elan wrote: > > 1. I would like to implement a wizard like application under PythonCard. > I.e. a series of input forms that include information and instructions > are to be displayed, one input form at a time, with "Next", "Previous", > "Finish", "Cancel" buttons at the bottom. > Does there exist an example for this kind of application? > If not, what would be the recommended way of implementing the successive > display of forms? (I do not want to use tabs, because I want to force > the user to navigate exclusively via navigation buttons at the bottom of > the screen.) > > 2. Also, I will want to dynamically lay out a form consisting of text > labels that may vary and that are loaded from a database table, as well > as choice boxes populated with applicable values for each text label. > The number of text labels/choice boxes may vary, depending on the > structured of the database table. > > Any pointers and advice regarding both questions would be highly > appreciated. > Hi Elan: If you take a look at the code for the standaloneBuilder app that I wrote, you will find something very similar in there. I wanted a 'wizard' style interface to use when creating a new project and I've done all of the things you mentioned, apart from loading text labels from a database. My approach was to use a resource file for each 'page' in the wizard, to make it easier to make changes to an individual page. The code loads each of the resource files on top of each other and I use the 'userData' proprties to tage each component according to which wizard page it gets displayed on. The 'Next' and 'Back' buttons then just have to run a bit of code which disables one set of controls and enables another set as you move between pages. I guess that loading the text labels from a database would be fairly trivial. If you take a look in site-packages/PythonCard/tools/standaloneBuilder in your main Python install directory, the file you want to be looking at is customDialogs.py starting from about line 158. There are some screen shots of my wizard in action on this page of my website: http://www.linux2000.com/pm.html Scroll down a bit to the 'Creating a new project' section. Good luck! > Thanks. > Elan > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users -- Regards Phil Edwards | PGP/GnuPG Key Id Brighton, UK | 0x68393AEE |