I'm a complete beginner to c++ so this may be a really stupid question...

Basically so far i have this:

s1Textbox->AppendText( gcnew String(ss.str().c_str()));

Obviously the text being displayed keeps appending. I looked at all of the methods for text boxes on the API but couldn't find anything to set the text?

Maybe i just missed it or something but i'd appreciate it if someone could help me.

Thanks

Recommended Answers

All 2 Replies

There's a Text property that supports both getting and setting:

s1Textbox->Text = gcnew String(ss.str().c_str());

Thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.