// JP opened flex table

Click to See Complete Forum and Search --> : Entering Char into Windows Forms Textbox


atomcracker
June 22nd, 2007, 05:02 PM
I have a windows forms textbox which I want to "type" a char into from a variable. However, the code i am using (as follows) inserts the ascii equivalent instead of the actual letter:


char myChar = 'M';
Texbox1->Text += myChar; //Textbox1 now reads whatever it was before plus "77" at the end.
//I want it to have "M" at the end instead.


I can understand why it might be doing this, but I'm stumped for a way to work around it.

Help will be very greatly appreciated

laitinen
June 22nd, 2007, 05:36 PM
Hi,

This is in the wrong forum. This is managed c++.

This should do it for you:

Textbox1->Text += Char::ToString(myChar);

Regards,

Laitinen

atomcracker
June 23rd, 2007, 03:46 AM
Oh thanks :).

ovidiucucu
June 23rd, 2007, 04:22 AM
This is in the wrong forum. This is managed c++.

Well then, I hope the thread feels better here... ;)

[ Moved thread ]

//JP added flex table