-
July 14th, 2014, 06:18 PM
#1
Button to display text box message
I'm new to GUI programming with windows visual studio 2010.
I'm currently making a math helping program in c++ windows form application.
I'm trying to make it so where the user presses the number button I such as 1 button to display a 1 in my textbox.
Code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
}
-
July 15th, 2014, 03:28 AM
#2
Re: Button to display text box message
So then simply assign the text "1" (in double quotes, as opposed to the numeric value 1 without the quotes) to the text box' Text property.
However, you'll probably want to also be able to use your calculator for other numbers than just 0 to 9, so it's probably better to append the newly entered digit to the text inside the text box, so that it doesn't overwrite any digits you already entered there before.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|