From: Ade <sk...@bl...> - 2005-04-03 09:47:39
|
-----Original Message----- >Message: 5 >Date: Fri, 1 Apr 2005 14:21:23 -0800 (PST) >From: Kevin Altis <al...@ya... >To: pyt...@li... >Subject: [Pythoncard-users] clearing up tab order in resourceEditor >Since several people have brought this up recently, I >just wanted to remind everyone that the tab order is >controlled by the order that controls are created on >the Background (panel) when the background is created >at runtime. This order is shown by the position of the >control in the Property Editor in the resourceEditor. >Under the Options menu in the resourceEditor, there >are menu items to move the components up, down, front, >and back. Since this issue comes up periodically, I >guess this needs to be made clearer in the >resourceEditor or some documentation, and I'm open to >suggestions. I apologise. I had not used the options to move the component. I have only recently changed from 0.80 and used a complex method Originally having found it in an old post, you had to bring each component to the front in reverse order. Having just tried the send backwards / forwards especially using the CTRL 1-4 shortcuts, it does the job wonderfully. So, sorry again for not updating my way around the interface. |
From: Liam C. <cy...@gm...> - 2005-04-03 10:58:20
|
I seriously do recommend a simple cut and paste in the resource file. Saves on keystrokes. :) On Apr 3, 2005 9:47 PM, Ade <sk...@bl...> wrote: > > > -----Original Message----- > >Message: 5 > >Date: Fri, 1 Apr 2005 14:21:23 -0800 (PST) > >From: Kevin Altis <al...@ya... > >To: pyt...@li... > >Subject: [Pythoncard-users] clearing up tab order in resourceEditor > > >Since several people have brought this up recently, I > >just wanted to remind everyone that the tab order is > >controlled by the order that controls are created on > >the Background (panel) when the background is created > >at runtime. This order is shown by the position of the > >control in the Property Editor in the resourceEditor. > >Under the Options menu in the resourceEditor, there > >are menu items to move the components up, down, front, > >and back. Since this issue comes up periodically, I > >guess this needs to be made clearer in the > >resourceEditor or some documentation, and I'm open to > >suggestions. > I apologise. I had not used the options to move the component. I have only > recently changed from 0.80 and used a complex method > Originally having found it in an old post, you had to bring each component > to the front in reverse order. > Having just tried the send backwards / forwards especially using the CTRL > 1-4 shortcuts, it does the job wonderfully. > So, sorry again for not updating my way around the interface. > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |
From: Alex T. <al...@tw...> - 2005-04-03 11:05:08
|
Liam Clarke wrote: >I seriously do recommend a simple cut and paste in the resource file. >Saves on keystrokes. :) > > Is there any way to control the tab order for components created dynamically from the app ? -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 30/03/2005 |
From: Phil E. <ph...@li...> - 2005-04-04 12:48:14
|
On Sun, 2005-04-03 at 12:04, Alex Tweedly wrote: > Is there any way to control the tab order for components created > dynamically from the app ? > AFAIK, Alex, it's just down to the order they appear in self.components. So if you have: ['button1', 'button2', 'button3'] and you then do self.components.insert(1, 'button4'), you should end up with ['button1', 'button4', 'button2', 'button3'] then that's your TAB order, reading from left to right. -- Regards Phil Edwards Brighton, UK |
From: Kevin A. <al...@se...> - 2005-04-04 16:52:26
|
On Apr 4, 2005, at 5:48 AM, Phil Edwards wrote: > On Sun, 2005-04-03 at 12:04, Alex Tweedly wrote: >> Is there any way to control the tab order for components created >> dynamically from the app ? >> > > AFAIK, Alex, it's just down to the order they appear in > self.components. > So if you have: > > ['button1', 'button2', 'button3'] > > and you then do self.components.insert(1, 'button4'), you should end up > with > > ['button1', 'button4', 'button2', 'button3'] > > then that's your TAB order, reading from left to right. > Actually, that won't work. self.components is a WidgetDict object as defined in model.py, it is not a simple list, it is a subclass of UserDict, so it is basically a glorified dictionary. Furthermore, the order of the components on the background is kept in the 'order' key and what it should do is have a list of the order the components (wxPython controls) were added to the background (wxPython Panel). You should never manipulate the order list directly! In order to modify the tab order dynamically, you basically have to destroy the controls and repopulate the panel which is what the resourceEditor does and it isn't particularly pretty, but if you need to do that sort of thing, then that's the code to look at. wxPython used to have a bug/feature where you could change the tab order simply by hiding and showing the controls, but that is long gone. I don't know why this never came up before, but I bet there is a problem if you want to have a component named parent, data, or order, so I probably need to test that, then change them to have leading underscores or something like that in the future, which also means updating the resourceEditor and perhaps some other tools. I'm not sure if I'll get to that this week before I leave for the UK or not. ka |
From: Kevin A. <al...@se...> - 2005-04-04 18:15:27
|
On Apr 4, 2005, at 9:52 AM, Kevin Altis wrote: > > I don't know why this never came up before, but I bet there is a > problem if you want to have a component named parent, data, or order, > so I probably need to test that, then change them to have leading > underscores or something like that in the future, which also means > updating the resourceEditor and perhaps some other tools. I'm not sure > if I'll get to that this week before I leave for the UK or not. > I retract this last part. Given that there are a number of methods and attributes that should be "protected" it makes more sense to change the places where you can set the component name to present an error dialog that disallows the "protected" names for methods and internal attributes. I think that would just be the strings in the list returned by dir() since the component names are really in the internal item 'data' and don't get exposed by dir. >>> dir(self.components) ['__cmp__', '__contains__', '__delitem__', '__doc__', '__getattr__', '__getitem__', '__init__', '__len__', '__module__', '__repr__', '__setattr__', '__setitem__', '_getAttributeNames', '_listeners', 'addChangeEventListener', 'clear', 'copy', 'data', 'fireChanged', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'order', 'parent', 'pop', 'popitem', 'setdefault', 'update', 'values'] So the code to protect invalid names just has to do if name in dir(self.components): # alert dialog, etc. here asking for a different name Anyone see a problem with this? The __setitem__ method could also protect itself and throw an exception if we get a component name that would cause a problem. BTW, these developer type issues will very soon start appearing only on the pythoncard-devel mailing list for those of you that want to be involved in this kind of stuff and want to sign-up. http://lists.sourceforge.net/lists/listinfo/pythoncard-devel I just submitted a request to gmane to add gmane.comp.python.pythoncard.devel as well. ka |
From: Alex T. <al...@tw...> - 2005-04-04 17:04:09
|
Phil Edwards wrote: > AFAIK, Alex, it's just down to the order they appear in self.components. Thanks Phil. Some things are just so obvious that even when you're looking right at them, it doesn't click. Thanks again. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 30/03/2005 |