I’m tring to add mutiline message to listbox using
wx.listbox.Append('part1 \r\n part2')
while on linux (gtk) im getting multiline box
on windows (msw) it just ignore the newline…
is there a way to get a similar functionality in windows?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The windows ListBox control doesn’t implement that behavior. While it allows drawing the item yourself and adjusting its height, wxWidgets doesn’t expose this functionality for the ListBox.
As an alternative, you could use the
wx.SimpleHtmlListBoxor derive fromwx.HtmlListBox.It inherits from the
ItemContainerjust like wx.ListBox, so the usage is essentially the same. Keep in mind that you have to escape certain characters (as shown in the example). For that you could usecgi.escape.