Lingo Dictionary > S > selectedText |  |

selectedText

Syntax

    member(whichTextMember).selectedText

Description

Text cast member property; returns the currently selected chunk of text as a single object reference. This allows access to font characteristics as well as to the string information of the actual characters.

Example

This handler displays the currently selected text being placed in a local variable object. Then that object is used to reference various characteristics of the text, which are detailed in the Message window.

    property spriteNum

    on mouseUp me
    	mySelectionObject = sprite(spriteNum).member.selectedText
    	put mySelectionObject.text
    	put mySelectionObject.font
    	put mySelectionObject.fontSize
    	put mySelectionObject.fontStyle
    end