Click here to Skip to main content
16,007,687 members
Home / Discussions / C#
   

C#

 
GeneralRe: programming Pin
marky77730-Apr-07 4:06
marky77730-Apr-07 4:06 
AnswerRe: programming Pin
Latheesan30-Apr-07 2:33
Latheesan30-Apr-07 2:33 
GeneralRe: programming Pin
Colin Angus Mackay30-Apr-07 3:18
Colin Angus Mackay30-Apr-07 3:18 
GeneralRe: programming Pin
Harikrk30-Apr-07 5:50
Harikrk30-Apr-07 5:50 
QuestionMdiParent Error Pin
Gareth H30-Apr-07 2:14
Gareth H30-Apr-07 2:14 
Questionreplace richtextbox control Pin
Latheesan30-Apr-07 2:01
Latheesan30-Apr-07 2:01 
AnswerRe: replace richtextbox control Pin
Dan Neely30-Apr-07 3:43
Dan Neely30-Apr-07 3:43 
GeneralRe: replace richtextbox control Pin
Latheesan30-Apr-07 4:31
Latheesan30-Apr-07 4:31 
Im not good at C# at all, so i'll try to explain this as clear as possible (from my point of view).

On the sample app provided in the article, it has a form without any rtb in it. BUT, the form us linked to an action form1_Load();

So, i had a look in there and this is the code i saw:

SyntaxHighlightingTextBox shtb = new SyntaxHighlightingTextBox();
shtb.Location = new Point(0,0);
shtb.Dock = DockStyle.Fill;
shtb.Seperators.Add(' ');
shtb.Seperators.Add('\r');
shtb.Seperators.Add('\n');
shtb.Seperators.Add(',');
shtb.Seperators.Add('.');
shtb.Seperators.Add('-');
shtb.Seperators.Add('+');
//shtb.Seperators.Add('*');
//shtb.Seperators.Add('/');
Controls.Add(shtb);
shtb.WordWrap = false;
shtb.ScrollBars = RichTextBoxScrollBars.Both;// & RichTextBoxScrollBars.ForcedVertical;

shtb.FilterAutoComplete = false;

shtb.HighlightDescriptors.Add(new HighlightDescriptor("Hello", Color.Red, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true));

As you can see, the class inside the syntax highlighting textbox library is called to make a new instance called "shtb" and then only after, words to highlight such as "hello" is added to it.

My question orginally was, is it possible to have the ability to highlight text inside rtb (as i type), without creating a new instance such as "shtb", because i already have a rtb on my form. I just want to add the syntax highlighting functionality to the existing rtb box i have.

Did i confuse you guys with what i am trying to achieve? Is this even possible?...Sigh | :sigh:
QuestionRe: replace richtextbox control Pin
Latheesan30-Apr-07 9:49
Latheesan30-Apr-07 9:49 
AnswerRe: replace richtextbox control Pin
.jpg1-May-07 7:10
.jpg1-May-07 7:10 
QuestionHow to resize control at runtime in C#? Pin
kunal220930-Apr-07 1:30
kunal220930-Apr-07 1:30 
AnswerRe: How to resize control at runtime in C#? Pin
Stefan Troschuetz30-Apr-07 1:35
Stefan Troschuetz30-Apr-07 1:35 
AnswerRe: how to find the minimum cost path in a matrix Pin
Christian Graus30-Apr-07 1:15
protectorChristian Graus30-Apr-07 1:15 
QuestiononMouseEnter strange behaviour... Pin
Seishin#30-Apr-07 0:22
Seishin#30-Apr-07 0:22 
GeneralRe: onMouseEnter strange behaviour... Pin
Seishin#30-Apr-07 1:34
Seishin#30-Apr-07 1:34 
QuestionObject of my own written type is not updated at design time [modified] Pin
microslav29-Apr-07 23:54
microslav29-Apr-07 23:54 
QuestionXML lookup table [modified] Pin
mail57235229-Apr-07 23:48
mail57235229-Apr-07 23:48 
AnswerRe: XML lookup tablString Pin
Brady Kelly30-Apr-07 0:15
Brady Kelly30-Apr-07 0:15 
GeneralRe: XML lookup tablString Pin
mail57235230-Apr-07 1:19
mail57235230-Apr-07 1:19 
QuestionProblem with overloaded constructor Pin
microslav29-Apr-07 23:40
microslav29-Apr-07 23:40 
AnswerRe: Problem with overloaded constructor Pin
Colin Angus Mackay29-Apr-07 23:49
Colin Angus Mackay29-Apr-07 23:49 
QuestionAuthenticate to a site Pin
ne0h29-Apr-07 22:30
ne0h29-Apr-07 22:30 
AnswerRe: Authenticate to a site Pin
althamda29-Apr-07 22:42
althamda29-Apr-07 22:42 
GeneralRe: Authenticate to a site Pin
ne0h29-Apr-07 23:41
ne0h29-Apr-07 23:41 
GeneralRe: Authenticate to a site Pin
althamda29-Apr-07 23:54
althamda29-Apr-07 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.