Re: Sizers for PythonCard

Alex Tweedly <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
Hugh Kernohan wrote:
> Alex,
>
>     Thank you.  As I don't have a suitable site I'll send you the file 
> for you to put on your website as you offer.
>
>   
Thanks Hugh.

It can now be found at http://www.tweedly.org/Python/sizerEditorV1a.zip
Note - I haven't yet looked at it all,  so please treat it with some 
care. Here are Hugh's accompanying instructions .....


Alex,
   This is my Sizer Editor code.
The zipped file is a self-standing directory tree 
..\sizerEditor_version1\.. etc.  The file advancedSizer.py should be 
copied to the PythonCard directory. My findfilestree.py is a cosmetic 
variation on a old favourite.

I'd be happy to be corrected on anything, including points of principle 
and good practice.  Some of the code looks clunky and inefficient, 
others bits quite taut.  I haven't done any testing with older versions 
but it certainly won't work with less than wxPython 2.8.4.2 of 8 Aug 07.

The bulk of the new code for the editor is in a BaseSizer class, and an 
all-new sizerpropertyEditor window which co-exists with the existing 
multipropertyEditor window.  Other additions to existing code are 
clearly marked (and sometimes annotated) in the files.

To use PythonCard.advancedsizer use the Sizer Editor to set the layout, 
then include the following in the on_initialize of the .py file:
     try:
       from PythonCard.advancedSizer import autoSizer
       self.useSizersFlag = True
       autoSizer(self)
   except:
       self.useSizersFlag = False
  This ensures that if PythonCard.advancedSizer is not available the 
code will still run, provided that useSizersFlag is checked before any 
sizer-specific routines are run.  (Its use can be seen in the Sizer 
Editor itself).



-- 

Alex Tweedly      mailto:[email protected]      www.tweedly.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.