Benjamin Jessup wrote: > Thanks! Right now I have a text control in a frame whose size is > mimicked by the floatcanvas text box in real time (along with the text). > But, the level of zoom is complicating the scaling, and I am missing > something. I am using: > > size = Canvas.ScalePixelToWorld(text_ctrl.GetSize()) > > But this only aligns the two sizes correctly at a single and specific > level of zoom. What am I missing?
I'm not sure when you are making that call, but the results depend on the state of the Canvas. As the level of zoom changes, so does the pixel size of the object, so you'd need to set the size of the TextCtrl whenever the zoom changes. Can you wrap this up in a small, self contained, example? I might be able to help debug, and this would be a cool addition to the Demos. -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
