[wx-dev] Re: ellipsize in wxStaticText (Re: wxStaticText GTK woes)

Vadim Zeitlin vadim at wxwindows.org
Wed Jan 10 08:40:28 PST 2007


On Wed, 10 Jan 2007 17:35:15 +0100 Francesco Montorsi <f18m_cpp217828 at yahoo.it> wrote:

FM> >  No, I think I see the confusion now: it's not up to the program to do it.
FM> > It's wx, i.e. you,
FM> ouch ;)

 In fact no -- I don't think you have to do anything special.

FM> > who must take care to implement START/END correctly for
FM> > RTL windows. IOW END should always remove the characters at the logical end
FM> > of the string, which can be at the right end (LTR) or left end (RTL).
FM> so, in conclusion, I need to write (I already did that btw) code which does 
FM> ellipsize text both at the end or at the start of a wxString... so that having 
FM> all three styles won't need additional work.

 wxST_DOTS_END should always replace the characters at the end of the
string with ellipsis. It doesn't depend on LTR/RTL.

FM> BTW I've fixed tab handling but now I need to add this RTL/LTR logic --
FM> how do I know if LTR is enabled in wx? I couldn't find any reference to
FM> RTL in docs except for wxDC::GetLayoutDirection...

 There is wxWindow::GetLayoutDirection(). But, again, why should you care?
Sorry if I'm confused but it seems to me that you don't need to do anything
special for RTL, it's just that it's going to be displayed in the reverse
direction but the logic at the string level is the same...

VZ





More information about the wx-dev mailing list