Don Taylor wrote:
When running a form design from the Designer I expected the initial size of the running form to be based upon the size of the form in the Designer but it appears to be based upon the size of the form as it was when it was last run.

This makes sense when running as a stand-alone app, but I expected to be able to resize the form in the designer, save it and then have that size as the initial default size.

The same is true for a form's initial position.

Yes, this is a feature. The settings by default get saved in your home directory (c:\Documents and Settings\<userName>\Application Data\Dabo on Windows, /home/<userName>/.dabo on Mac/Lin). There are files there named like userSettings-*.ini.

If you erase the user settings file, the form will take the default position/size as defined in your cdxml file.

Other than that, you can change the value of the form's SaveRestorePosition property. Setting it to False will not set the position and size from the user settings table. Setting it to True will.

You could do this dynamically even, so that on your development system the size/position isn't restored, but on systems you distribute your app to, the size/position will be restored. Set an environmental variable "_devbox" on your system, to "yes". Then try this in your form's initProperties method:

def initProperties(self):
        import os
        if os.getenv("_devbox").lower() in ("yes", "true"):
                # This is the development system. Don't restore size
                self.SaveRestorePosition = False

I haven't tested the above, but the idea is sound.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to