how to make multiline text in wxListCtrl

Vadim Zeitlin vadim at wxwindows.org
Sun Mar 4 10:57:36 PST 2007


On Wed, 28 Feb 2007 20:10:27 +0100 Milan Babuskov <milanb at panonnet.net> wrote:

MB> Vadim Zeitlin wrote:
MB> > MB> On my system, wxGTK 2.8.0 (Gtk2, Unicode) draws multiline text over the 
MB> > MB> other cells.
MB> > ...
MB> > MB> I don't know if this behaviour is intended,
MB> > 
MB> >  Surely not.
MB> > 
MB> > MB> it does not work like that on MSW (tried on Windows 2000)
MB> > 
MB> >  What does it do under MSW? Does it just ignore the line breaks (i.e.
MB> > discards them) or shows only the first line of text?
MB> 
MB> It shows small rectangle-like characters instead of newlines - and shows 
MB> all lines in a single like.

 This is what I thought. IOW, MSW doesn't really support multiline texts
neither but at least doesn't corrupt the display.

MB> First I thought it was because text contained only \n and not \n\r, so
MB> I tried now once more, and the problem is still there.

 Notice that you should have tried "\r\n" as this is what DOS/Windows use
in text files. But I don't think it would change anything.

MB> wxGTK 2.8.0 Unicode on Slackware 10.2 using Gtk 2.6.10
MB> http://javagames.sourceforge.net/wxlistctrl-gtk.png
MB> 
MB> wxMSW 2.8.0 Unicode on Windows 2000 using COMCTL32.DLL 5.81.2920.0
MB> http://javagames.sourceforge.net/wxlistctrl-msw.png

 Thanks!

 Now the question is whether we should replace \n with some unprintable
character in the generic version (trivial) thus standardizing on the
current MSW behaviour or do something different/better. Any ideas?

 Thanks,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list