From: Michele C. <mca...@in...> - 2009-10-07 17:28:19
Attachments:
multisellist.py
|
Hi, following the same approach of PythonCard's components, I tried to add a multiselection list (as opposed to the single selection one avaialable 'List') by simply copy-paste-modify the code for List in list.py under components. Aside from the type field, which contains LB_MULTIPLE instead of LB_SINGLE, a couple of changes in the getter and setter and the class name not much was needed. Problems arise though when I open the layout editor. First of all, the MultiSelList doesn't appear in the components list. Furthermore, when I click on List to instantiate a new layout component, it actually instantiate a MultiSelList instead of the usual List. I suppose there is something going on with the registration of the class with the engine, as the console spits an error out because the class key lookup for MultiSelList in the component class dictionary failed (in registry.py). I also tried adding the new component in a another folder appcomponents as that seems the way suggested. No luck. Do you have any hint on what it takes to add this new class/component or alternatively extend the current 'List' to be either ways (multi selection AND single selection (default so that it does not clash with the tools already developed)? My Best Regards, Thanks for this amazingly simple GUI framework. Michele |
From: John H. <ec...@ya...> - 2009-10-20 23:27:34
|
Does anybody have more examples on the tree control? The minimum tree only show very simple functions and I'm able to do those. But there is no information on how I can traverse the tree - start with the root, get to the NextChild, get the label, delete a branch, programmatically expand or contract a branch, ... - all the standard things one would do with a tree... Thanks, -- John Henry |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-10-28 11:24:18
|
On 21/10/09 00:27, John Henry wrote: > Does anybody have more examples on the tree control? The minimum tree only show very simple functions and I'm able to do those. But there is no information on how I can traverse the tree - start with the root, get to the NextChild, get the label, delete a branch, programmatically expand or contract a branch, ... - all the standard things one would do with a tree... My use of the tree control hasn't been much more sophisticated than the example. I did add a couple of extra method aliases to PythonCard\components\tree.py because the ones already there are only enough to support the example. So in __init__ I added setExpanded = wx.TreeCtrl.Expand clearTree = wx.TreeCtrl.DeleteAllItems so that having built the tree from a dictionary I could open up all of the nodes at startup, and I could tear it down and rebuild it differently later on. -- XXXXXXXXXXX |
From: John H. <ec...@ya...> - 2009-10-29 03:41:45
|
With the help of a debugger and plenty of Google searches, and a lot of guessing, I was able to invoke most of the wx tree functions. It proves that the minimal tree wrapper does work. -- John Henry ----- Original Message ---- > From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > To: John Henry <kim...@ya...> > Cc: pyt...@li... > Sent: Wed, October 28, 2009 4:24:03 AM > Subject: Re: [Pythoncard-users] tree > > On 21/10/09 00:27, John Henry wrote: > > Does anybody have more examples on the tree control? The minimum tree only > show very simple functions and I'm able to do those. But there is no > information on how I can traverse the tree - start with the root, get to the > NextChild, get the label, delete a branch, programmatically expand or contract a > branch, ... - all the standard things one would do with a tree... > > My use of the tree control hasn't been much more sophisticated than the > example. I did add a couple of extra method aliases to > PythonCard\components\tree.py because the ones already there are only > enough to support the example. So in __init__ I added > > setExpanded = wx.TreeCtrl.Expand > clearTree = wx.TreeCtrl.DeleteAllItems > > so that having built the tree from a dictionary I could open up all of > the nodes at startup, and I could tear it down and rebuild it > differently later on. > > -- > XXXXXXXXXXX > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |