How to make a text field "copyable" but not editable?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to make a text field "copyable" but not editable?
Hello,
Is there a way to make a text field "copyable" but not editable?
I know this could easily be done with a script attached to a button "Copy" for example, but I prefer to let the user select part of the text, and then use the standard menu item "Copy"... but this field shouldn't be editable, so the user can't modify the field.
In fact, I would like a field like this text you'are reading in your browser: you have the ability to select and copy some characters, but not modify the page's texts.
Thank you.
Is there a way to make a text field "copyable" but not editable?
I know this could easily be done with a script attached to a button "Copy" for example, but I prefer to let the user select part of the text, and then use the standard menu item "Copy"... but this field shouldn't be editable, so the user can't modify the field.
In fact, I would like a field like this text you'are reading in your browser: you have the ability to select and copy some characters, but not modify the page's texts.
Thank you.
Re: How to make a text field "copyable" but not editable?
Hi Zax,
just take an ordinary field like "Scrolling field" and only check "Locktext" additionally.
Worked here as advertized: text stays select- and copy-, but not edit-able.
Best
Klaus
just take an ordinary field like "Scrolling field" and only check "Locktext" additionally.
Worked here as advertized: text stays select- and copy-, but not edit-able.

Best
Klaus
Re: How to make a text field "copyable" but not editable?
Danke Klaus 
I was trying on a label field... My bad.

I was trying on a label field... My bad.
Re: How to make a text field "copyable" but not editable?
Will also work with a "Label" field, if you check "TraversalOn" and "Autohilite" in the inspector!
Re: How to make a text field "copyable" but not editable?
Interestingly, text in a locked field can only be selected by clicking and dragging across the desired string. Double-clicking does not work at all. This can be scripted, though:
Craig
Code: Select all
on mouseDoubleDown
select the clickText
end mouseDoubleDown
Re: How to make a text field "copyable" but not editable?

Re: How to make a text field "copyable" but not editable?
Bogsy.
I have seen your tutorials. Lovely, all.
It was not obvious to me that one of them in particular addressed this issue. Not sure how I missed that connection.
Craig
I have seen your tutorials. Lovely, all.
It was not obvious to me that one of them in particular addressed this issue. Not sure how I missed that connection.

Craig

Re: How to make a text field "copyable" but not editable?
Happens to me all the time. See, what happens is, I get on the 5:15 for Albuquerque, when what I really needed was the 6:20 to St. Joe...


Re: How to make a text field "copyable" but not editable?
Hmmm. We have a failure to communicate. Fortunately, it matters not a whit.dunbarx wrote:
Not sure how I missed that connection.
Happens to me all the time.
I meant that there was no clue that a video explaining that very thing was lingering nearby. It was not mentioned anywhere earlier in the thread.
It matters not a whit.

Craig
Re: How to make a text field "copyable" but not editable?
I have filed a suggestion to show the cursor even when field is locked:
https://quality.livecode.com/show_bug.cgi?id=22030
https://quality.livecode.com/show_bug.cgi?id=22030
Kaveh
Re: How to make a text field "copyable" but not editable?
I understand what you are aiming at, but this would go against typical interface guidelines, I think, if the cursor changed to the usual "iBeam" style. Perhaps a different one?I have filed a suggestion to show the cursor even when field is locked:
Craig
Re: How to make a text field "copyable" but not editable?
I think if the cursor were visible in a locked field, we'd all start getting bug reports about how typing fails.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to make a text field "copyable" but not editable?
Jacque. So you mean any cursor of any kind. I get where you are coming from.I think if the cursor were visible in a locked field,
Craig