Editor Document Modifiers

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Greg Shaffer - Boulder
Avatar
Hi,

I do a lot of my Document setup in my Editor's constructor. This works great, until I copy/paste the control in design mode, which causes a new Document to be created in the InitializeComponent function. If I don't go and manually remove this autogened code, then I lose my setup.

It would be ideal for my situation if I could override the Editor's Document property, and then I could do my setup in the setter of that property.

Is it possible to make the Editor's Document property virtual?

Thanks,
Greg

Comments (4)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We can make it virtual but you'd have to end up calling the base property setting if you wanted to assign a Document. Is that ok?


Actipro Software Support

Posted 18 years ago by Greg Shaffer - Boulder
Avatar
Hi,

That is fine. I can call the base version. Maybe it would be better to add an event like "DocumentChanged" or something like that to the Editor. That way, you can avoid getting support inquiries for broken editors.

-Greg
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok the SyntaxEditor.DocumentChanged event has been added for the next maintenance release that fires when the SyntaxEditor.Document property is changed.


Actipro Software Support

Posted 18 years ago by Greg Shaffer - Boulder
Avatar
Great!

Thank you very much!

-Greg
The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.