Watermark in Editor???

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Ashton - Developer, Schema Solutions LLC
Version: 4.0.0284
Is it possible in SyntaxEditor to show a watermark in the editor underneath the actual text?

Something similar to what you might see if you printed out something with the "DRAFT" watermark but actually centered in the editor on screen?


Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Sure, if you inherit our VisualStudio2005SyntaxEditorRenderer class there are a whole bunch of Draw methods you can override to render before and after text is displayed. Use those and you should be able to achieve this effect.

Then set your renderer to the SyntaxEditor.Renderer property to use it.

Actipro Software Support

Posted 11 years ago by Robert Muir

I tried inheriting from the renderer and overrode DrawTextAreaBackground, but it didn't work properly. I could draw on the editor, but once I scrolled the editor the drawing broke up completly and was unrecognizable.

I'd like to draw some text over the top of the text, and I'd like it positioned with respect to control - it shouldn't scroll with the text.

Any suggestions?


Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Robert,

Hmm.. it may be due to the way the WinForms editor does double buffering (and scrolling of the double buffer for best performance) that could be causing this.  I'm not sure of a way around that unfortunately other than if you make a separate control that sits above the SyntaxEditor in layout.

Actipro Software Support

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.