|
-
Apr 8th, 2006, 04:44 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How to edit the text from a RichTextBox with code?
I'm a beginner in Java, and I'm trying to write some text in a RichTextBox programatically. I noticed it has a .Text property and if I write there smth in design view it appears on the form, but in code if I try to write something like this:
Code:
richTextBox1.Text="aaa";
it won't work. Can anyone help? Thank you.
-
Apr 8th, 2006, 05:58 AM
#2
Re: How to edit the text from a RichTextBox with code?
First of all: this is not java this is J# (there is a big difference)
second of all: where did you put this code?
if you put it in an event handler, the event must be raised (fired) in order to execute the code.
But to make sure, use a breakpoint on this line so you know if it executes, if it does the text should change
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Apr 8th, 2006, 06:42 AM
#3
Thread Starter
Addicted Member
Re: How to edit the text from a RichTextBox with code?
 Originally Posted by ComputerJy
First of all: this is not java this is J# (there is a big difference)
Ummm... I know that J# is Microsoft's version of Java and it uses .NET framework, but I thought if I write some code in J# and then try to run it with Java, it would work. From what you told me, seems to me I was wrong. So, forget about my question, I need to work with Java and not J#. If I want to work with Java do I need to work with NetBeans, JCreator, Eclipse or some kind of IDE for Java? Because I won't write my code with Notepad... 
And since you told me there is a big difference between the J# and Java, I have one more question... Did I get the difference or are any more differences between them?
Thank you.
-
Apr 8th, 2006, 06:51 AM
#4
Re: How to edit the text from a RichTextBox with code?
I can give you more than 300 differences but the most important one (for your code)
java doesn't support "properties"
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
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
|