RichText.GetSelectionFormat

table RichText.GetSelectionFormat ( 

string  ObjectName,

boolean OnlyConsistentAttributes = true )

Example 1

tbFormat = RichText.GetSelectionFormat("RichText1", true);

if (tbFormat) then
    if (tbFormat.Bold) then
        Dialog.Message("Format", "The selected characters are all bold.");
    else
        Dialog.Message("Format", "The selected characters are not all bold.");
    end
end

Determines if the selected characters in the "RichText1" richtext object are all bold and shows the result in a dialog message. This is done using the RichText.GetSelectionFormat action and checking the "Bold" table item.

See also:  Related Actions