Workaround For No selectionChanged Message?

Richard Gaskin ambassador at
Wed Oct 13 09:45:15 EDT 2010

Scott Rossi wrote:

> Recently, Monte Goulding wrote:
>>> I currently have text formatting controls in a palette
>>> There's got to be an easier way.
>> Are you sure you are using a palette? This should work without you doing
>> anything?
> Um, yes, I'm pretty sure that "palette stack xyz" sets the stack's style to
> palette...  :-)
> But you got me thinking, I am trying to maintain the user's selection after
> the text has been styled, and it seems that even the LiveCode IDE doesn't do
> this (selection is lost after style is changed).  So maybe the previously
> selected text needs to be reselected after being styled.
> This seems to work, but I could have sworn there was some window switching
> situation where the text selection would be lost.  Anyway, I'll continue
> with this option -- thanks for the push Monte.

You should be able to retain the text selection if the traversalOn of 
the buttons in the toolbar is set to false.  When that property is true, 
the button gets focus when it's clicked, causing the selection to be lost.

  Richard Gaskin
  Fourth World
  LiveCode training and consulting:
  Webzine for LiveCode developers:
  LiveCode Journal blog:

More information about the Use-livecode mailing list