Archived

This topic is now archived and is closed to further replies.

Newbie with a question

This topic is 5574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I''m working on something in Visual C++.net and I''m having some trouble. This is probably simple, but I haven''t messed with this much before now. Ok, I''ve got my main form (called MainForm) with a menu, and a textbox (called tester). Now all I want to do is change the Text in the textbox. What I did was the following from the main() function (the textbox is public): MainForm::tester->Text = "Text I want in the box"; and it told me that the stuff to the left of tester->Text needs to be a class/struct/union. MainForm is a class though that I derived from Form so I don''t understand the error. Then I tried adding a function (method whatever the hell you call it) of the textbox that would change the Text and that didn''t work. It said something about calling a static function from a non-static function or something. Anyway, my question is, what is the proper way to go about changing the Text in a textbox without using say a menu command (which works fine BTW but it''s not what I want). "Why not go mad?"

Share this post


Link to post
Share on other sites