Benjamin Jessup wrote: > My application has a floatcanvas in the center pane of an AUI manager. > When I add/remove docked side panes the floatcanvas moves as well, which > is a behavior I want to get rid of, but do not know the best way to go > about doing it. > > If I add a vertical side pane on the *right* of width 100 px, the > floatcanvas gets pushed left, cutting off the 100 pixels on the *left* > side of the floatcanvas.
Is the whole canvas getting moved? If so, then that's a AUI issue, which I know nothing about. You might do some testing by putting a regular old wx.Panel in instead of the FloatCanvas, and see how it behaves. > If I add a vertical side pane on the *left* of width 100 px, the > floatcanvas gets pushed right by 100 px but then makes another > adjustment which moves itself left again of some amount less than 100 > px. BUT, it doesn't move back to its original location. Or are you wanting the image itself to stay in the same place, even as the Canvas gets larger? If so, that will take a bit of a trick, FloatCanvas draws oriented to the center of the window, so if you change the window size, the center moves, so the image is going to move. The problem is that when the FloatCanvas changes size, it doesn't know how it was moved. > How can I modify the floatcanvas code to not move the floatcanvas around > at all upon these resizings? Or maybe the question is: How can I > translate the floatcanvas upon resizing to appear as if it has not moved > at all? I think that is the trick. You may be able to get the position of the FloatCanvas in Screen coordinates, then you can know how it was moved, and you can call Canvas.MoveImage((dx, dy), CoordType="pixel") to move the image to the same place it was. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______________________________________________ FloatCanvas mailing list [email protected] http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
