How to create custom controls in C #?

So, I am working on a C # program that functions as an IDE. The thing is, I am doing this through a rich text box, custom SUPER syntax highlighting is inefficient.

I was wondering if there is a way to make a custom control look like a rich text box (even based on one) and then simplify the creation of syntax highlighting ...

So how do I customize the controls? And if you were very beautiful, you would point me towards a good textbook!

+6
source share
4 answers

easy to get only from basic management

public class CustomRichTextBox:RichTextBox { public CustomRichTextBox() { this.Multiline = true; this.WordWrap = false; this.AcceptsTab = true; //... } } 
+1
source

I would suggest looking at some tutorials, for example

http://www.codeproject.com/KB/miscctrl/cutebutton.aspx

As NavidRahmani said above, you don’t need to start from scratch, you can expand an existing control or use controls that are already made from different libraries.

Such as thermal controls.

+1
source

No, there is no control in your toolbar that is trying to pretend to be a good editor. TextBox and RichTextBox had very different design goals. As I understand it, this has been resolved several times, the ScintillaNET project .

+1
source

Source: https://habr.com/ru/post/890879/


All Articles