What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Ask]RichEdit Control and Syntax Color

[Ask]RichEdit Control and Syntax Color
Author: Message:
Lén
Junior Member
**

Avatar

Posts: 16
35 / Male / Flag
Joined: Feb 2008
O.P.
i am trying to highliht key word such as "def, if, else ..." to do a window whis syntax colorizing.

I try this and give you feedback.

EDIT: here's my XML:

code:
<Control xsi:type="RichEditControl" Id="txtMessage">
     <Position Top="15" Width="350" Height="350" Left="5"/>
          <Caption>Script</Caption>
          <Attributes>
               <TextMode>Rich Text</TextMode>
               <WantReturn>true</WantReturn>
           </Attributes>
</Control>

Here's your function:
code:
function OnWndScriptEnvEvent_EditTextChanged( pPlusWnd, sControlId ) {
    if ( sControlId === 'txtMessage' ) {
        var hObjWnd = pPlusWnd.GetControlHandle ( sControlId );
        Interop.Call( 'user32', 'SendMessageW', hObjWnd, EM_SETSEL, 0, 10 );
    }
}

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!).

This post was edited on 08-11-2009 at 04:48 PM by Lén.
08-11-2009 03:20 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Ask]RichEdit Control and Syntax Color - by Lén on 08-09-2009 at 04:44 PM
RE: [Ask]RichEdit Control and Syntax Color - by matty on 08-10-2009 at 08:10 PM
RE: [Ask]RichEdit Control and Syntax Color - by Lén on 08-10-2009 at 08:24 PM
RE: [Ask]RichEdit Control and Syntax Color - by matty on 08-10-2009 at 08:27 PM
RE: [Ask]RichEdit Control and Syntax Color - by Lén on 08-10-2009 at 08:33 PM
RE: [Ask]RichEdit Control and Syntax Color - by matty on 08-11-2009 at 12:47 PM
[no subject] - by Lén on 08-11-2009 at 03:20 PM
RE: [Ask]RichEdit Control and Syntax Color - by matty on 08-11-2009 at 04:59 PM
RE: [Ask]RichEdit Control and Syntax Color - by Lén on 08-11-2009 at 05:52 PM
RE: [Ask]RichEdit Control and Syntax Color - by matty on 08-11-2009 at 06:37 PM
RE: [Ask]RichEdit Control and Syntax Color - by Lén on 08-11-2009 at 07:17 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On