-
I once heard rumors that i could change colors of parts of the text in a textbox. Sort of like a html-editor with syntax highlighting or Word or whatever.
Is it true, and if yes, how can it be done?
I would greatly appreciate your help, so thanks in advance.
-
You cannot do this in a regular Textbox. To change color, you have to use the RichTextBox Control. And it's .SelColor property.
-
Thanks
-
You can however change the whole textbox to a certian colour. This is done via the ForeColor property.
-
Keep in mind, Megatron, that a regular Textbox is not the perfect thing for an html-editor because the text can go beyond the limit of a textbox's maximum length.
Also, a textbox cannot change certain word's colors. A regular textbox can have only 1 color which is the forecolor. A RichTextBox can have many colors using the .SelColor property.
Even though you already know this, just letting you know that a regular textbox is not the best thing for this certain task :rolleyes:.