Convert numbers to a wxString and storing it in a listctrl

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Chr
Earned some good credits
Earned some good credits
Posts: 115
Joined: Tue May 31, 2005 2:17 pm

Convert numbers to a wxString and storing it in a listctrl

Post by Chr »

Hi,
I've a number between 0-400. Can I convert it to a wxString, for inserting it in a wxListCrtl?
Thank you
wxWidgets is nice
User avatar
T-Rex
Moderator
Moderator
Posts: 1249
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine

Post by T-Rex »

Code: Select all

wxString s = wxString::Format(wxT("%i"), some_number);
Bundy
I live to help wx-kind
I live to help wx-kind
Posts: 153
Joined: Fri Apr 29, 2005 9:46 am
Location: Poland

Post by Bundy »

Try:

Code: Select all

 WxListCtrl1->InsertItem(x,wxString() << some_number);

Regards
Bundy
"Fate rewards prepared mind"

Quote from movie "Liberator 2"