TextEditor Marked Content

Discuss GUI programming with the MUI Royale plugin here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

TextEditor Marked Content

Post by djrikki »

Hi,

I want to be able to create a 'Make Uppercase' function on any marked text the user may select.. however I have no idea how to obtain the content of the marked text?

'hello' becomes 'HELLO'

Code: Select all

Local ucase = UpperStr( ??? )
mui.DoMethod("textarea","replace",ucase)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: TextEditor Marked Content

Post by airsoftsoftwair »

Use Texteditor.GetSelection for that.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: TextEditor Marked Content

Post by djrikki »

This only returns the X and Y coordinates of the selected block. I could use Copy to clipboard, but of course that overrides what is in the clipboard which is pretty lame.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: TextEditor Marked Content

Post by airsoftsoftwair »

True, seems like I forgot to implement a method for getting partial text contents. I've now implemented the Texteditor.GetText method that allows you to do just that, i.e. pass x1,y1,x2,y2 to it and get the text described by these coordinates back.
Post Reply