From: Kevin A. <al...@se...> - 2001-08-28 01:34:59
|
> The duplicate widget works as expected but if we are going to place the > new widget in the same location as the original (instead of, say, offset > by a few pixels) then can we have the new widget on top please? > > My expectation (from using similar techniques in other products) is to > be able to duplicate a widget and then drag the new one to the location > I want it to be in. This may be beyond us at the moment, if so I will > add it to SF as a feature request so we don't forget. I agree. The reason you currently get the new widget underneath the original is because wxPython orders controls (widgets) like that; the first widget created is in front of widget 2, widget 2 is in front of widget 3... What I have to do is save the state of every widget, destroy every widget, then recreate them all with the new widget being created first. As you can see, quite a pain and messy to look at, but it is doable. A side effect of doing this is that the new widget will end up as the first item instead of the last one, which is what you would expect. An alternative would be to simply let the duplicated item remain behind all the other widgets, but offset it from the original. This is much easier to do and will work except when the offset still leaves it behind other widgets. So, choose your poison. I think I like the second solution the best. I'll still have to do the first solution when you want to reorder the widgets as far as I can tell. Any other suggestions I haven't thought of? Robin? > Not from me. I'd love to be able to save resource files but I can I > suggest the default behaviour is to not override an existing file? Not > sure how we can do this with the wx file dialog but I can live in hope > (or read the documentation). I'll probably just have a Save As... which is easy enough. Initially, whatever stack, background, menus are defined will just be output the way they were originally except for the stack size and position. I also need to save the state of the toolTips or just stop setting the toolTip, which doesn't work very well anyway. ka |