[Ask]RichEdit Control and Syntax Color - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Ask]RichEdit Control and Syntax Color (/showthread.php?tid=91809) [Ask]RichEdit Control and Syntax Color by Lén on 08-09-2009 at 04:44 PM
Hi, RE: [Ask]RichEdit Control and Syntax Color by matty on 08-10-2009 at 08:10 PM You need to use the following function: http://mpscripts.net/docs/ref-pluswnd-richedit_setcharformat.php RE: [Ask]RichEdit Control and Syntax Color by Lén on 08-10-2009 at 08:24 PM
yeah i know but i really don't know how to: RE: [Ask]RichEdit Control and Syntax Color by matty on 08-10-2009 at 08:27 PM
Take a look at this: http://msdn.microsoft.com/en-us/library/bb761661%28VS.85%29.aspx RE: [Ask]RichEdit Control and Syntax Color by Lén on 08-10-2009 at 08:33 PM
could you give me an exemple please ? i'm not at ease with the MSDN help RE: [Ask]RichEdit Control and Syntax Color by matty on 08-11-2009 at 12:47 PM
js code: This is just an example on how to select text. What are you trying to highlight? Code? You also need to make sure the control in the XML has the following set: xml code: [no subject] by Lén on 08-11-2009 at 03:20 PM
i am trying to highliht key word such as "def, if, else ..." to do a window whis syntax colorizing. code: Here's your function: code: It always replace what i'm typing, so there is just one letter written ... but i can change this letter because it's selected. What i'm looking for is like the Messenger Plus! Script Editor, i mean when i type "if" in the editor, it's autamatically blue colored ... I think that the editor is a RichEdit, so i can do that too, or not ? EDIT2: Do you know if <WantTabs> work with msn plus! and richedit ? because when i delete <WantReturn> pushing Enter doesn't work. I want to use TAB to do a \t (like in Scripting Environment of MSN plus!). RE: [Ask]RichEdit Control and Syntax Color by matty on 08-11-2009 at 04:59 PM The reason it is constantly overwriting what you type is because it is selecting the first 10 characters when a change is made. I was simply showing you an example of how to select text. From that point you can use the Plus! function I first told you about to set the colour. RE: [Ask]RichEdit Control and Syntax Color by Lén on 08-11-2009 at 05:52 PM
oh yeah i finnaly understand ^^ code: Have I to do that for every keyword ??? EDIT: How to Unselect my text after it has been replaced ? EDIT: I found that and it work pretty good, but i still ask how can i unselect the texte after it has been colored ^^ code: EDIT: i've found it tu unselect: code: but i'm scared of how mani "loop for" i will use to do a global... 'cause this method juste replace the first "def" entry. RE: [Ask]RichEdit Control and Syntax Color by matty on 08-11-2009 at 06:37 PM Honestly this is really a horrible way of doing it. There is a "CodeEditControl" but it only supports JScript text highlighting. RE: [Ask]RichEdit Control and Syntax Color by Lén on 08-11-2009 at 07:17 PM
ok thanks for the great help |