Selected Text

Jonathan Lynch jonathandlynch at gmail.com
Tue Sep 7 14:57:32 EDT 2010


Have you explored the selectionchanged message?

For one of my applications, I use this for detecting clicks inside unlocked
fields.

On Tue, Sep 7, 2010 at 2:52 PM, Warren Kuhl <warrenkuhl at gmail.com> wrote:

>  Mark,
>
> Thanks for the explanation.  It really gaves me a good understand with how
> the process works.  I will see if I can lock/unlock the field as necessary
> as the user needs to ability to change the text.
>
> Appreciate your help!
> Warren
>
> On Tue, Sep 7, 2010 at 1:38 PM, Mark Schonewille <
> m.schonewille at economy-x-talk.com> wrote:
> > Hi Warren,
> >
> > It looks like the problem is not the selectedText but the mouseUp
> message.
> Unlocked fields don't receive a mouseUp message when the user clicks in
> such
> a field, but control-click and command-click do trigger a mouseUp message.
> So, either you have to provide a way to lock and unlock the field as
> necessary or you need to tell the user that control-click or command-click
> will allow him or her to edit or process selected text.
> >
> > You can't have a field editable without allowing the user to drag text
> around, but you can allow the user to select text without making the field
> editable. If you lock the text but don't turn off the traversalOn, then the
> text will be selectable but not editable. Or don't you want the user to be
> able to select text? In this case, turn off the traversalOn too.
> >
> > If the lockText of a field is true and the traversalOn is tru too, you
> will be able to click in a field and trigger the mouseUp message that way,
> without pressing the command or control key.
> >
> > --
> > Best regards,
> >
> > Mark Schonewille
> >
> > Economy-x-Talk Consulting and Software Engineering
> > Homepage: http://economy-x-talk.com
> > Twitter: http://twitter.com/xtalkprogrammer
> > KvK: 50277553
> >
> > Download the Installer Maker plugin for Runtime Revolution at
> http://qurl.tk/ce Create installers for Mac and Windows on *every*
> Rev-compatible platform. No additional software needed.
> >
> > On 7 sep 2010, at 19:59, Warren Kuhl wrote:
> >
> >> 1) I am trying to return the selected text in a field.  It looks like
> >> this can only be done on locked text.  Is there anyway around this?
> >>
> >> In the field I am trying:
> >>
> >> on mouseup
> >>   answer selectedtext()
> >> end mouseup
> >>
> >> The above is only true when the field is locked.
> >>
> >> 2) Also...how do I prevent text to be dragable in a field?
> >>
> >> Thanks for any help!
> >>
> >> Warren
> >
> >
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> >
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
Do all things with love



More information about the use-livecode mailing list