From: Kevin A. <al...@se...> - 2004-05-06 19:33:26
|
I think this may easier to do in raw wxPython since the app is=20 relatively simple to do if you use the right controls, but those=20 controls aren't wrapped for PythonCard 0.7.3.1. See explanation below. On May 5, 2004, at 3:00 PM, Ray Price wrote: > Hi, > > Is PythonCard right for me? I want to build a cross-platform GUI > application that will do the following in the most simple version: > > 1) retrieve a TIFF image via HTTP Yes, see the worldclock sample. Retrieving the data is just standard=20 Python and to avoid saving the image data to disk, you use=20 ImageFromStream=00 to convert it to something usable by wxPython. = Whether=20 to use wxPython or PythonCard would depend somewhat on the size of the=20= TIFF images. If they are so large that they need to be displayed and=20 manipulated in a scrolling window, then wxPython is definitely going to=20= be more suitable since PythonCard doesn't currently have a scrolling=20 panel or canvas. > 2) allow the user to draw black rectangles over parts of the image to > hide the areas > 3) add (overlay?) associated text with each rectangle Yes, though now you start to get into implementation details where the=20= solution is complicated by how much user interaction is required. An=20 object canvas is probably better for this sort of thing. In wxPython,=20 Chris Barker's FloatCanvas is probably the right thing to use, though=20 wxOGL might work just as well. I will be adding a component wrapper for=20= FloatCanvas in release 0.8. You could try some initial mockups with the=20= BitmapCanvas component. Cliff Well's did a DialogEditor using wxOGL=20 that does almost everything you want, but I don't know if he would want=20= to share that code or not. > 4) send the rectangle coordinates and associated text back to a web > server That's just Python, not a GUI issue. > 5) back to step 1 for another image > > Additional requirements are: > 1) a toggle button to change the black rectangles to a transparent > color to allow viewing of what is underneath There isn't a ToggleButton in PythonCard 0.7.3.1 and I can't remember=20 if the reason it isn't included is that it isn't supported on all=20 platforms yet. I'll look at this again for 0.8 since all platforms=20 might support it in 2.5.1.5 and above. You can obviously use a checkbox=20= to get the same effect. > Sound like something PythonCard can handle on Linux and Windows? > > Thanks for your input, > Ray Assuming the TIFF images don't need to scroll this app would be very=20 relatively easy with PythonCard on Windows since components (wxPython=20 controls) can overlap even without using FloatCanvas or wxOGL.=20 Overlapping controls don't work as well on Linux/GTK. So, looking at the explanations above, I think you're probably better=20 off just going with raw wxPython code for this one since PythonCard=20 0.7.3.1 just doesn't have all the pieces you need right now. ka |