[wx-dev] wxMAC: wxStaticText::DoGetBestSize problem

Stefan Csomor csomor at advancedconcepts.ch
Wed Jan 10 01:07:06 PST 2007


Hi Tim

I'm looking into that today, I'll have to come back to the do-it-yourself approach, but take into account line breaks

Thanks,

Stefan

> -----Original Message-----
> From: Tim Kosse [mailto:tim.kosse at gmx.de]
> Sent: Mittwoch, 10. Januar 2007 00:32
> To: wx-dev at lists.wxwidgets.org
> Subject: [wx-dev] wxMAC: wxStaticText::DoGetBestSize problem
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I have a problem with wxStaticText under wxMAC. (CVS Head, Mac OS X
> 10.4.8, Intel Core Duo).
> 
> The following code works fine under wxMSW and wxGTK. It also used to
> work on wxMAC but recently it fails under wxMAC:
> 
> wxStaticText *t = new wxStaticText(this, -1, _T("Some long string"));
> wxSize bestSize = t->GetBestSize();
> t->SetLabel(_T("short"));
> wxASSERT(bestSize != t->GetBestSize());
> 
> After lots of painful debugging(*), I think I've found the reason. I
> could track the problem down to revision 1.69 of
> src/mac/carbon/stattext.cpp introduced 2006-12-20:
> http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/src/mac/carbon/stattex
> t.cpp.diff?r1=1.69&r2=1.68
> 
> m_peer->GetBestRect does nothing more than to call the
> GetBestControlRect function of some OS X library. It seems to return
> the
> old value despite the control having a new label.
> 
> My knowledge of the OS X API is very limited, can someone please have
> a
> look at this?
> 
> 
> Tim
> 
> (*) Due to lack of a Mac, VNC connection across the globe. So fast...
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFpCX+8N9+lcqiUkURAgmAAJ4/phE8d/I7EhJDiDHegYAFPhgK4wCg31q9
> 1Sus8MOO4JwikcGlEGKXYl4=
> =+u2U
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org




More information about the wx-dev mailing list