Click here to Skip to main content
15,914,416 members
Home / Discussions / C#
   

C#

 
GeneralRe: Form Hide Dont Close Pin
gvanto15-Jun-07 17:29
gvanto15-Jun-07 17:29 
GeneralRe: Form Hide Dont Close Pin
Martin#17-Jun-07 19:57
Martin#17-Jun-07 19:57 
QuestionPrinting the contents of an RTF Textbox control... Pin
rvp717y13-Jun-07 12:44
rvp717y13-Jun-07 12:44 
AnswerRe: Printing the contents of an RTF Textbox control... Pin
mav.northwind13-Jun-07 19:36
mav.northwind13-Jun-07 19:36 
GeneralRe: Printing the contents of an RTF Textbox control... Pin
rvp717y14-Jun-07 9:58
rvp717y14-Jun-07 9:58 
QuestionNeed DataGridView with Footer. Pin
hdv21213-Jun-07 11:51
hdv21213-Jun-07 11:51 
AnswerRe: Need DataGridView with Footer. Pin
Pankaj - Joshi13-Jun-07 18:14
Pankaj - Joshi13-Jun-07 18:14 
QuestionSyntax highlighting textbox Pin
Latheesan13-Jun-07 11:27
Latheesan13-Jun-07 11:27 
Hello,

I am using this library in one of my project : http://www.codeproject.com/cs/miscctrl/SyntaxHighlighting.asp[^]

This is how i used it in my editor i've been working on:

/* Create a new SyntaxHighlightingTextBox */<br />
            shtb = new SyntaxHighlightingTextBox();<br />
            shtb.Name = "shtb";<br />
            shtb.Location = new Point(0, 0);<br />
            shtb.Dock = DockStyle.Fill;<br />
            shtb.WordWrap = false;<br />
            shtb.ScrollBars = RichTextBoxScrollBars.Both;<br />
            shtb.FilterAutoComplete = false;<br />
            shtb.AcceptsTab = true;<br />
            shtb.DetectUrls = false;<br />
            shtb.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));<br />
<br />
            /* Separaters */<br />
            shtb.Seperators.Add(' ');<br />
            shtb.Seperators.Add('\r');<br />
            shtb.Seperators.Add('\n');<br />
            shtb.Seperators.Add('\t');<br />
            shtb.Seperators.Add(',');<br />
            shtb.Seperators.Add('.');<br />
            shtb.Seperators.Add('-');<br />
            shtb.Seperators.Add('+');<br />
<br />
            /* Controls */<br />
            shtb.ContextMenuStrip = EditorContextMenu;<br />
            Controls.Add(shtb);<br />
            this.Controls.Add(this.MainMenu);<br />
<br />
/* Syntax Highlighting Keywords [ BLUE ] */<br />
            try<br />
            {<br />
                TextReader syntax_blue = new StreamReader("synHighLib_DB/blue.txt");<br />
                string line = syntax_blue.ReadLine();<br />
                while (line != null)<br />
                {<br />
                    shtb.HighlightDescriptors.Add(new HighlightDescriptor(line, Color.Blue, null, DescriptorType.Word, DescriptorRecognition.WholeWord, true));<br />
                    line = syntax_blue.ReadLine();<br />
                }<br />
                syntax_blue.Close();<br />
            }<br />
            catch (Exception e)<br />
            {<br />
                MessageBox.Show("Exception Error : " + e.Message, "eAthena Script Editor");<br />
            }


This is the contents of my blue.txt db file

0<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9


As you can see, i want to turn all interger that the user types in the editor into blue color. When i tried this in the compiled app, this is how it looks like:

http://img254.imageshack.us/img254/9892/untitledog4.png[^]

How do you set it up so that as you type all the defined syntax in the blue.txt db file turns blue? e.g. 123456 (as i type, it shud be blue)
AnswerRe: Syntax highlighting textbox Pin
Latheesan13-Jun-07 11:34
Latheesan13-Jun-07 11:34 
GeneralRe: Syntax highlighting textbox Pin
Latheesan13-Jun-07 12:40
Latheesan13-Jun-07 12:40 
QuestionWhy I didn't get the job Pin
Mark J. Miller13-Jun-07 11:10
Mark J. Miller13-Jun-07 11:10 
GeneralWell done! Thank's for sharing it! Pin
Martin#13-Jun-07 19:33
Martin#13-Jun-07 19:33 
QuestionIntercept Outgoing Port 80 Pin
zx2c413-Jun-07 11:00
zx2c413-Jun-07 11:00 
AnswerRe: Intercept Outgoing Port 80 Pin
Not Active13-Jun-07 11:06
mentorNot Active13-Jun-07 11:06 
GeneralRe: Intercept Outgoing Port 80 Pin
zx2c413-Jun-07 11:08
zx2c413-Jun-07 11:08 
GeneralRe: Intercept Outgoing Port 80 Pin
Not Active13-Jun-07 13:59
mentorNot Active13-Jun-07 13:59 
GeneralRe: Intercept Outgoing Port 80 Pin
zx2c413-Jun-07 14:02
zx2c413-Jun-07 14:02 
GeneralRe: Intercept Outgoing Port 80 Pin
Not Active13-Jun-07 14:06
mentorNot Active13-Jun-07 14:06 
GeneralRe: Intercept Outgoing Port 80 Pin
zx2c413-Jun-07 14:07
zx2c413-Jun-07 14:07 
GeneralRe: Intercept Outgoing Port 80 Pin
Colin Angus Mackay13-Jun-07 23:52
Colin Angus Mackay13-Jun-07 23:52 
GeneralRe: Intercept Outgoing Port 80 Pin
Member 368719016-Jul-09 23:05
Member 368719016-Jul-09 23:05 
GeneralRe: Intercept Outgoing Port 80 Pin
Colin Angus Mackay17-Jul-09 1:33
Colin Angus Mackay17-Jul-09 1:33 
QuestionGDI+ Text Rendering Pin
Akin Ocal13-Jun-07 10:55
Akin Ocal13-Jun-07 10:55 
Questionopen text file in a textbox and print it Pin
merwa13-Jun-07 9:06
merwa13-Jun-07 9:06 
AnswerRe: open text file in a textbox and print it Pin
Not Active13-Jun-07 11:21
mentorNot Active13-Jun-07 11:21 

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.