Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

well, my groupmates and i are working on a project. we're creating a new programming language and we're using c#. i'm new to this obviously that's why i need all the help i can get.

 

i have a tabcontrol where i can programmatically create a textbox added in a tabpage in the said tabcontrol using the "open" and "new" on my menu. i was able to do the "open" menu by reading from a file and setting it as the text of an instantiated textbox added in an instantiated tabpage. the problem is i cannot get the text from a textbox so that i could create a file and "save" it there.

 

please help me. i would really appreciate your help! thank you very much!

  • *Experts*
Posted

I'm confused as to what you're doing (we're creating a new programming language...?). But, to save out the contents of a textbox to a file:

System.IO.File.CreateText("c:\\test.txt").Write(textBox1.Text);

 

That's all in one shot, obviously you should break that down and check for errors, etc. You said you needed something asap, and I hate that kind of pressure!

 

A lack of planning on your part does not constitute and emergency on my part

 

Good luck with the assignement!

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted
Will a newly instantiated textbox actually contain the text that was in it, or just the properties of the object itself? If I am reading this correctly, maybe try to save the text from the box in a .txt file, then instatiate the new textBox object, then add the saved text to the new textBox.
Posted
I'm confused as to what you're doing (we're creating a new programming language...?). But, to save out the contents of a textbox to a file:

System.IO.File.CreateText("c:\\test.txt").Write(textBox1.Text);

 

That's all in one shot, obviously you should break that down and check for errors, etc. You said you needed something asap, and I hate that kind of pressure!

 

 

 

Good luck with the assignement!

 

-ner

 

it's a project. our task is to create a programming language.

 

you know, i wouldn't ask something i already know, and if you're pressured, then don't. i was asking people in this forum who 'can' and 'are willing to' help. and i said "i need help asap" because we have a deadline, and as i've said it's a project. i came here to ask for help, because i am not knowledgeable with such stuff. compared to you, i'm just a neophyte.

Posted

clarifications

 

ok here's the thing. i have a tabcontrol that programmatically creates tabpages with a textbox in it. i have a menubar with "open", "new" and "save" menu in it. the "new" menu creates a tabpage with a blank textbox. the "open" menu opens and reads files (under a filter), then creates a tabpage with a textbox containing the data inside the file. think of it as a notepad, only you can open multiple files via the tabcontrol.

 

here's the problem. the save menu is supposed to create a file, reads the text on textbox of a selected (current/active) tabpage and writes it on the file. what i was asking before was how can i access the text on the textbox that was added in a tabpage,which, of course,is added on the tabcontrol

 

i hope that clears some of the questions.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...