The selectedText for controls without focus

Mike Bonner bonnmike at gmail.com
Fri Feb 24 12:21:35 EST 2017


Nevermind, it doesn't work, and I think it should.  Enhancement request?
Bug?

On Fri, Feb 24, 2017 at 10:16 AM, Mike Bonner <bonnmike at gmail.com> wrote:

> of field "fieldname" is an optional argument youcan use.
>
> get the selectedtext of field "myfield"
>
> On Fri, Feb 24, 2017 at 9:50 AM, Bob Sneidar via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
>> Hi all.
>>
>> The Short Version:
>>
>> Is there a way to get the hilited text for a control without focus?
>>
>>
>> The Long Version:
>>
>> I use a method for forms (by which I mean LC cards with fields and
>> buttons on them) where I set the traversalOn to false on all the fields
>> when I am simply viewing the data, so that the user will not be led to
>> believe they are making actual edits to the database simply because they
>> changed the value of a field.
>>
>> I have new/edit buttons that then set the traversalOn accordingly. But
>> when not editing (view mode no traversalOn) users can still hilited text in
>> a field. Of course, the field does not receive focus (no focus border) but
>> it is clear that a selection has been made.
>>
>> My question is, HOW DO I GET THAT SELECTION? I want the user to be able
>> to copy text in view mode, but unless the control has traversalOn set to
>> true, AND the control has focus, none of the text selection commands seem
>> to work. Not only that, none of the field handlers work. OpenField,
>> selectionChanged, nothing.
>>
>> It would be better i suppose if the end user was unable to even select
>> text in this mode (I can accomplish that with lockText) that for the text
>> to be hilited, but nothing can be done with it. I can work around this I am
>> sure, but it will require a lot of factoring.
>>
>> My question is, is there a way to get that visible selection? The engine
>> is obviously hiliting it.
>>
>> Bob S
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>



More information about the use-livecode mailing list