need a lil help here.

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Michelle Lye
Version: 4.0.0237
Avatar
Hi there, Is there a way to find out what the current active document is? For example, I'm using one syntax editor and multiple documents for different tabs. Since only one tab can be opened at one time, i need to find out what the current syntaxeditor.document is. I've tried:

dim editor as new actiprosoftware.syntaxeditor.syntaxeditor
dim doc1_txt as String

If editor.document is doc_P1 = true then

doc1_txt = doc_P1.text

End if

while setting above that editor.document= doc_P1 in which doc_p1 is a syntaxeditor document.
But that doesn't work... is there a property that i can use for this?

thanks for any help.

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Michelle,

The SyntaxEditor.Document property is the right way to get/set the Document that SyntaxEditor is editing. So I think your code should work fine unless there is something else going on on your end that is wrong.

If you are just trying to find the text of the current document you can also do something like:
Dim text As String = editor.Document.Text


Actipro Software Support

Posted 13 years ago by Michelle Lye
Avatar
thanks... after tinkering around i finally got it. =)

[Modified at 01/06/2007 02:08 AM]
The latest build of this product (v2020.1 build 0400) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.