This project is read-only.

Why does not the 'Text' property work like in System.Windows.Forms.TextBox

Topics: User Forum
Jan 29, 2009 at 6:08 PM
Edited Jan 29, 2009 at 6:10 PM
w
Feb 4, 2009 at 2:28 PM
It works like every Text property, didn't it?

It a normal string so you can access it like every other String property.
What exactly is your problem???
Feb 5, 2009 at 3:35 PM
Edited Feb 6, 2009 at 1:40 PM
Sorry, i works now.

But when i use the TextChanged event it will not work. Fx:

Private Sub Scintilla1_TextChanged(ByVal... ......
       TextBox1.Text = Scintilla1.Text
End Sub

Feb 5, 2009 at 3:51 PM
I havn't tried your Code because I'm not that good at VB.NET but in my opinion it should work.
The event is a normal Controlevent.

Describe your problem in more detail, I still don't understand it ;-)
Feb 6, 2009 at 1:50 PM
I just mean that the TextChanged event of the Scintilla component doesn't work:

C# Code:
private void scintilla1_TextChanged(object sender, EventArgs e)
        {
            textBox1.Text = scintilla1.Text;
        }


VB 2008 Code:
 
Private Sub Scintilla1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Scintilla1.TextChanged
        TextBox1.Text = Scintilla1.Text
 End Sub


If someone asked me what would happen if one of theese events was fired i would say that the text in the TextBox1 would be the same as in the Scintilla1, but it doesn't, nothing happens.
Feb 6, 2009 at 10:16 PM

Hi!

I have the same problem.Event TextChanged does'nt work in C#.

Feb 8, 2009 at 12:21 AM
Yes, it seems like TextChanged still don't work. It was discussed there:
http://www.codeplex.com/ScintillaNET/Thread/View.aspx?ThreadId=45625

So, only way is to use DocumentChanged event, only it's not very comfortable, as it's used more then one time when you type one symbol for example.

Feb 8, 2009 at 11:20 PM
I completely agree that the TextChanged event should fire. I've created work item 21053 to address this oversight.


Thanks,
Jacob