[Scripting Bug] RichEditControl and SetControlText - 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: WLM Plus! Bug Reports (/forumdisplay.php?fid=7) +----- Thread: [Scripting Bug] RichEditControl and SetControlText (/showthread.php?tid=70979) [Scripting Bug] RichEditControl and SetControlText by Eljay on 01-23-2007 at 07:15 PM
Well quite simply, when trying to set the text of a RichEditControl with SetControlText (with Rich Text mode enabled) the text set is not "rich". code: The text is displayed as [b]Testing[/b] not as it should be Testing. The reason I consider this a bug is that when you use SetControlText on a RichStaticControl, it works fine and the text is bold/italic/coloured/whatever. ----- On a related note, GetControlText when used on a RichStaticControl doesnt return the formatting from the text. Although I realise this is probably just a limitation not a bug. RE: [Scripting Bug] RichEditControl and SetControlText by vikke on 01-23-2007 at 07:41 PM
Since I think those are just SetWindowText, and GetWindowText, they are limited like that. RE: [Scripting Bug] RichEditControl and SetControlText by Eljay on 01-23-2007 at 07:58 PM I understand that, but I'm guessing what Plus! does is just handle the WM_SETTEXT message sent (or in this case just edit the text as it's being set using Plus!'s own function) and replaces it's own formatting codes with the ones needed for the same formatting in the RichEdit control (Hence why it works with RichStaticControl, but not RichEditControl). RE: [Scripting Bug] RichEditControl and SetControlText by deAd on 01-23-2007 at 09:34 PM
In rich text controls, you have to use messages to set the format, Plus! just calls the SetWindowText API. BBCode tags are not parsed in rich edit controls because Plus! has no need to anywhere in the program. The chat window edit box is not a standard rich edit control, so Plus! has no need to hook into them, as opposed to rich static controls, which Plus! uses and hooks. RE: [Scripting Bug] RichEditControl and SetControlText by Eljay on 01-24-2007 at 07:44 AM
quote: How about Script Editor? RE: RE: [Scripting Bug] RichEditControl and SetControlText by vikke on 01-24-2007 at 03:58 PM
quote:You can have other methods as well. If BB-codes doesn't work I hope Patchou includes that in next version RE: RE: [Scripting Bug] RichEditControl and SetControlText by deAd on 01-24-2007 at 09:31 PM
quote:That's not BBCode, it's just sending formatting messages... RE: [Scripting Bug] RichEditControl and SetControlText by Eljay on 01-24-2007 at 09:44 PM
quote: Hmm I posted that when I just woke up, excuse my sleep induced stupidity. But anyway I still don't see why it works for static and not edit, surely the messages sent would be the same for both controls? Anyway if there is a reason for it and it's not a bug, then I guess I will have to just parse BBCode myself. RE: RE: [Scripting Bug] RichEditControl and SetControlText by deAd on 01-24-2007 at 10:00 PM
quote:It just doesn't need to parse BBCode for rich edit controls anywhere in the program, but it doesn't. For static controls it does need to :/ RE: [Scripting Bug] RichEditControl and SetControlText by Eljay on 01-24-2007 at 10:11 PM
quote: I understand that, what I am trying to say is that me writing a bbcode parser in a script when Plus! obviously already has this functionality included (although it's only an assumption that the same code can be used for RichEdit) is just sort of reinventing the wheel. If this can't be added easily I guess I shall just have to code my own parser when i get to RichEdit in my plan which is to get all controls fully documented and accessible for developers (because I suck at having original script ideas ). |