Results 1 to 4 of 4

Thread: [RESOLVED] How to edit the text from a RichTextBox with code?

  1. #1

    Thread Starter
    Addicted Member zahadumy's Avatar
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    187

    Resolved [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.
    The first step in solving a problem is to define the problem clearly.

    -----
    Icons | EZIconConverter | Popup Messages
    101 samples: 2003 2005
    Code converter: C# -> VB .NET | VB .NET -> C# | VB .NET <-> C#


    -----
    Visual Studio 2005/.NET Framework 2.0

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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

  3. #3

    Thread Starter
    Addicted Member zahadumy's Avatar
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    187

    Re: How to edit the text from a RichTextBox with code?

    Quote 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.
    The first step in solving a problem is to define the problem clearly.

    -----
    Icons | EZIconConverter | Popup Messages
    101 samples: 2003 2005
    Code converter: C# -> VB .NET | VB .NET -> C# | VB .NET <-> C#


    -----
    Visual Studio 2005/.NET Framework 2.0

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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
  •  



Click Here to Expand Forum to Full Width