Re: The selectedText for controls without focus
Richard that script snippet actually helped me solve a different problem. I remember now why I was using traversalOn instead of lockText. I have certain fields I do not want users to edit, so I set the lockText to true. I then have a handler called enableForm that enables every field and button with a name that matches a column in a table. But of course I don't want users editing the unique ID of a record, even though I want to display it. Your snippet solves that problem. I just put it into field scripts I don't want users to edit, and use lockText for enabling/disabling fields. Works a peach. Bob S > On Feb 28, 2017, at 08:05 , Richard Gaskin via use-livecode >wrote: > > >> on rawkeydown k > >> if k = 99 then > >> if the commandKey is "down" then copy > >> end if > >> end rawkeydown ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Oh right you are! The thing that was throwing me is double-clicking does not work, but I can triple click and it selects the whole chalupa and I can copy it. I can also drag select. This will work. Bob S > On Feb 28, 2017, at 10:52 , J. Landman Gay via use-livecode >wrote: > > On 2/28/17 9:58 AM, Bob Sneidar via use-livecode wrote: >> I just think that LC should work like virtually every other forms >> based app I've ever used, where being editable is not a prerequisite >> for copying text. > > Did you try the field settings I suggested? It does work, it's already > built-in: > > autoHilite = true > traversalOn = true > locktext = true > > This allows selecting and copying but not editing. > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
On 2/28/17 9:58 AM, Bob Sneidar via use-livecode wrote: I just think that LC should work like virtually every other forms based app I've ever used, where being editable is not a prerequisite for copying text. Did you try the field settings I suggested? It does work, it's already built-in: autoHilite = true traversalOn = true locktext = true This allows selecting and copying but not editing. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Bob Sneidar wrote: > On Feb 24, 2017, at 22:09 , Richard Gaskin wrote: >> >> on rawkeydown k >> if k = 99 then >> if the commandKey is "down" then copy >> end if >> end rawkeydown > > For that matter I could just check the status of the "state" property > (view | new | edit) to allow/disallow editing. Not saying there are > not workarounds. I just think that LC should work like virtually > every other forms based app I've ever used, where being editable is > not a prerequisite for copying text. The purpose of that script is not to allow copying, but to disallow cutting and pasting. LC is a programming toolkit, and a very flexible one, with a wider range of GUI messages than most other scripting languages. The price of flexibility is the need to write code now and then. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
For that matter I could just check the status of the "state" property (view | new | edit) to allow/disallow editing. Not saying there are not workarounds. I just think that LC should work like virtually every other forms based app I've ever used, where being editable is not a prerequisite for copying text. Bob S > On Feb 24, 2017, at 22:09 , Richard Gaskin via use-livecode >wrote: > > on rawkeydown k > if k = 99 then > if the commandKey is "down" then copy > end if > end rawkeydown > > -- > Richard Gaskin ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
For a scriptless solution that's purely property-driven, what Jacque said covers normal click-and-drag selection at the small cost of multi-click selection. And if you need multi-click selection and don't mind a small bit of scripting, putting this in a normal editable field seems to make it uneditable well enough while still allowing Copy to work: on rawkeydown k if k = 99 then if the commandKey is "down" then copy end if end rawkeydown -- Richard Gaskin Fourth World Systems Software Design and Development for Desktop, Mobile, and Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
On 2/24/17 8:18 PM, Bob Sneidar via use-livecode wrote: Ok I've played with locked, traversalOn, and disabled and the only thing that alows me to enable/disable editing of the contents of a field is traversalOn. No combination of the other settings allow me to select text (in any manner that a user would expect) and yet prevent the editing of the text. Set a field to use locktext, traversalOn, and autohilite. You can select and copy text without the ability to edit. Command/Control-C is built into the engine so you don't need to know what the selection is, the engine just does it. Your scripts don't need to do anything to accomodate this. You can't double-click a word to select it, but you can drag. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Don't ignore the autoHilite of a field. Dictionary says: Specifies whether a button highlights when it's pressed, or whether selected text in a field is highlighted. Phil Davis On 2/24/17 6:18 PM, Bob Sneidar via use-livecode wrote: Ok I've played with locked, traversalOn, and disabled and the only thing that alows me to enable/disable editing of the contents of a field is traversalOn. No combination of the other settings allow me to select text (in any manner that a user would expect) and yet prevent the editing of the text. I can probably check the pEditing property of each stack (which contains new|edit|view) in a keyUp handler or something to pass keyUp or no to control whether or not a user can edit or no. But it seems like a lot of convolutions to go through for something so simple as allowing a user to select and copy data from an uneditable field. Think of a web form. You can copy text all the live long day and yet not be allowed to edit it. That is what I am shooting for. I agree that if copying is not allowed, or to put it another way, if getting the selectedText or hilitedText is not possible, then the UI should not indicate that text is selected. So let's kill that first, then consider whether or not there ought to be a property that returns the hilited text of a field regardless of the status of traversalOn. Maybe we can have a new field and button property: editable? Bob S On Feb 24, 2017, at 16:23 , Richard Gaskin via use-livecodewrote: So I agree there's a bug there, but I'd go the other way: if traversalOn is supposed to prevent selections, it should also prevent selections that occur from double-clicking on words. -- Richard Gaskin ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Ok I've played with locked, traversalOn, and disabled and the only thing that alows me to enable/disable editing of the contents of a field is traversalOn. No combination of the other settings allow me to select text (in any manner that a user would expect) and yet prevent the editing of the text. I can probably check the pEditing property of each stack (which contains new|edit|view) in a keyUp handler or something to pass keyUp or no to control whether or not a user can edit or no. But it seems like a lot of convolutions to go through for something so simple as allowing a user to select and copy data from an uneditable field. Think of a web form. You can copy text all the live long day and yet not be allowed to edit it. That is what I am shooting for. I agree that if copying is not allowed, or to put it another way, if getting the selectedText or hilitedText is not possible, then the UI should not indicate that text is selected. So let's kill that first, then consider whether or not there ought to be a property that returns the hilited text of a field regardless of the status of traversalOn. Maybe we can have a new field and button property: editable? Bob S > On Feb 24, 2017, at 16:23 , Richard Gaskin via use-livecode >wrote: > > So I agree there's a bug there, but I'd go the other way: if traversalOn is > supposed to prevent selections, it should also prevent selections that occur > from double-clicking on words. > > -- > Richard Gaskin ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Bob Sneidar wrote: Hi Richard. You are "locking" fields. I am setting the traversalOn to false. The reason I use this is because a locked field will still show the focus border, which I do not want. The focus border should be governed independently, using the showFocusBorder property. If you turn that off and it still shows with traversalOn true, that would be a bug. As for traversalOn, when I turn that off the reason I don't get a focus border is because I also don't get focus - without keyboard interaction allowed with traversalOn, I'm unable to select text. That is, by the most common means, click-and-drag. I do find that I can double-click a word to select it, and when double-clicked in a field with traversalOn turned off then my example menu does indeed fail to recognize that selection. So I agree there's a bug there, but I'd go the other way: if traversalOn is supposed to prevent selections, it should also prevent selections that occur from double-clicking on words. -- Richard Gaskin Fourth World Systems Software Design and Development for Desktop, Mobile, and Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
On 2/24/17 3:33 PM, Bob Sneidar via use-livecode wrote: Hi Richard. You are "locking" fields. I am setting the traversalOn to false. The reason I use this is because a locked field will still show the focus border, which I do not want. I suppose I can lock the field and lock the field. I will play around with it. You can turn off the focusborder in the field's property inspector. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Hi Richard. You are "locking" fields. I am setting the traversalOn to false. The reason I use this is because a locked field will still show the focus border, which I do not want. I suppose I can lock the field and lock the field. I will play around with it. Bob S > On Feb 24, 2017, at 12:35 , Richard Gaskin via use-livecode >wrote: > > If has one menu and a simple script in it: > > on menuPick pItemName > put the selectedText > end menuPick > > So here everything I do with selections in locked fields gives me the same > results as unlocked fields. I've had products that rely heavily on this > behavior. If you're seeing something different we need to dig into specifics > to discover the differences. But once we do I'm confident we can get it to > work for you. > > -- > Richard Gaskin ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
The difference is, turning traversal off, rather than setting the locktext to true doesn't work. Even if one manages to hilite text in the non-traversable field, it isn't really selected. (Which is why if it were me I'd not do it that way) On Fri, Feb 24, 2017 at 1:35 PM, Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > Bob Sneidar wrote: > > On Feb 24, 2017, at 10:06 , Richard Gaskin wrote: > >> > >> That should not be needed. > >> > >> LiveCode allows only one active field selection in non-list fields. > > > > Yes I did. It returns empty. I have a menu which intercepts the > > Copy menu selection. I hilite the text in a field whose traversalOn > > is false, then select Copy from the menu. In the menu handler I have > > "put the selectedText". I also tried "hilitedText". Neither work. I > > also tried the hilitedText of field "fldIPAddress". No bueno. If > > however you SET the hilitedText from a handler, it DOES return > > something. So it's clear that the property CAN be set even if > > traversalOn is false. The engine is just not doing it. > > > > This has actually been the case since version 2 when I began using > > Revolution. > > Which Copy menu item, LC's or one of yours? > > In my last recipe I was using the copy command but you said you were > having issues with the selectedText, so I came up with this one: > http://fourthworldlabs.com/rev/LockedFieldText.livecode > > If has one menu and a simple script in it: > > on menuPick pItemName >put the selectedText > end menuPick > > So here everything I do with selections in locked fields gives me the same > results as unlocked fields. I've had products that rely heavily on this > behavior. If you're seeing something different we need to dig into > specifics to discover the differences. But once we do I'm confident we can > get it to work for you. > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for Desktop, Mobile, and Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Bob Sneidar wrote: > On Feb 24, 2017, at 10:06 , Richard Gaskin wrote: >> >> That should not be needed. >> >> LiveCode allows only one active field selection in non-list fields. > > Yes I did. It returns empty. I have a menu which intercepts the > Copy menu selection. I hilite the text in a field whose traversalOn > is false, then select Copy from the menu. In the menu handler I have > "put the selectedText". I also tried "hilitedText". Neither work. I > also tried the hilitedText of field "fldIPAddress". No bueno. If > however you SET the hilitedText from a handler, it DOES return > something. So it's clear that the property CAN be set even if > traversalOn is false. The engine is just not doing it. > > This has actually been the case since version 2 when I began using > Revolution. Which Copy menu item, LC's or one of yours? In my last recipe I was using the copy command but you said you were having issues with the selectedText, so I came up with this one: http://fourthworldlabs.com/rev/LockedFieldText.livecode If has one menu and a simple script in it: on menuPick pItemName put the selectedText end menuPick So here everything I do with selections in locked fields gives me the same results as unlocked fields. I've had products that rely heavily on this behavior. If you're seeing something different we need to dig into specifics to discover the differences. But once we do I'm confident we can get it to work for you. -- Richard Gaskin Fourth World Systems Software Design and Development for Desktop, Mobile, and Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Yes I did. It returns empty. I have a menu which intercepts the Copy menu selection. I hilite the text in a field whose traversalOn is false, then select Copy from the menu. In the menu handler I have "put the selectedText". I also tried "hilitedText". Neither work. I also tried the hilitedText of field "fldIPAddress". No bueno. If however you SET the hilitedText from a handler, it DOES return something. So it's clear that the property CAN be set even if traversalOn is false. The engine is just not doing it. This has actually been the case since version 2 when I began using Revolution. Bob S > On Feb 24, 2017, at 10:06 , Richard Gaskin via use-livecode >wrote: > > That should not be needed. > > LiveCode allows only one active field selection in non-list fields. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Bob Sneidar wrote: > Enhancement Request 19323 submitted. > > As to your post, yes the selectedText 'of the field' will work. > But a menu command like "Copy" would not know which field was > selected. I suppose I could loop through all the fields and get > the one which was not empty. I'll play with that a bit. Did you try it without the "of "? That should not be needed. LiveCode allows only one active field selection in non-list fields. This means that selecting a text run will in any field that allows it will cause any other field to lose selection and become the selectedField. This is independent of other properties like lockText, and is logically needed to prevent cases where more than one field might have a run of text selected. I've been relying on solid handling of text selections in locked fields for years, but just in case I also tested this in v9 right now: 1. Make a field as you describe 2. Make a button with this script: on mouseUp select word 2 of fld 1 copy end mouseUp 3. Turn off the button's traversalOn property. That's essential for the same reason this all works: like most systems, LC only has one keyboard-focused object at a time, and if the traversalOn is off (why isn't it just called "traversal"?) then clicking on it will not take keyboard focus away from other objects, like the selection of text runs in fields. 4. Click the button. 5. Paste into any editor and see if it worked. -- Richard Gaskin Fourth World Systems Software Design and Development for Desktop, Mobile, and Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
If by "as expected" you mean the selectedText of the field can be obtained, then this is likely because you set it with the button. Selecting it with a cursor does not behave the same way. How odd. I may have to dig into the IDE and find where this is happening. Bob S > On Feb 24, 2017, at 09:50 , Bob Sneidar via use-livecode >wrote: > >> To test this, I had a button set the >> selection, made sure that traversal was off, then put the selectedtext of >> the field, and it worked as expected. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Enhancement Request 19323 submitted. As to your post, yes the selectedText 'of the field' will work. But a menu command like "Copy" would not know which field was selected. I suppose I could loop through all the fields and get the one which was not empty. I'll play with that a bit. Bob S > On Feb 24, 2017, at 09:36 , Mike Bonner via use-livecode >wrote: > > One last thing. On windows, with traversalon and locktext to true, text is > selectable, but as expected there is no insertion point. The only way I > can make a selection with traversalon = false is to double click a word. > > This is the opposite of just setting the locktext to true, one can drag and > select, but multi clicks don't select. getting the selectedtext of field > "whatever" does indeed work. (and you could turn off the focusborder too) > > My guess is that despite the hilite that appears when traversal is off, the > text isn't actually selected. To test this, I had a button set the > selection, made sure that traversal was off, then put the selectedtext of > the field, and it worked as expected. > > So, I'd call it a bug. Either a) one shouldn't be able to faux select in > that mode, or b) it should be an actual real selection which it obviously > is not. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
*sigh* my mistake again. Even when selecting a word with script it doesn't work. (I still had locktext on, combined with traversal being off, and THAT worked. As soon as I turned the locktext back off it failed to work) Shutting up now, till I get some sleep. :D On Fri, Feb 24, 2017 at 10:36 AM, Mike Bonnerwrote: > One last thing. On windows, with traversalon and locktext to true, text is > selectable, but as expected there is no insertion point. The only way I > can make a selection with traversalon = false is to double click a word. > > This is the opposite of just setting the locktext to true, one can drag > and select, but multi clicks don't select. getting the selectedtext of > field "whatever" does indeed work. (and you could turn off the focusborder > too) > > My guess is that despite the hilite that appears when traversal is off, > the text isn't actually selected. To test this, I had a button set the > selection, made sure that traversal was off, then put the selectedtext of > the field, and it worked as expected. > > So, I'd call it a bug. Either a) one shouldn't be able to faux select in > that mode, or b) it should be an actual real selection which it obviously > is not. > > On Fri, Feb 24, 2017 at 10:26 AM, Bob Sneidar via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> I'll submit one. >> >> Bob S >> >> >> > On Feb 24, 2017, at 09:21 , Mike Bonner via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> > >> > Nevermind, it doesn't work, and I think it should. Enhancement request? >> > Bug? >> > >> > On Fri, Feb 24, 2017 at 10:16 AM, Mike Bonner >> 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@lists.runrev.com> wrote: >> >> >> >>> Hi all. >> >>> >> >>> The Short Version: >> >>> >> >>> Is there a way to get the hilited text for a control without focus? >> >>> >> >>> >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
One last thing. On windows, with traversalon and locktext to true, text is selectable, but as expected there is no insertion point. The only way I can make a selection with traversalon = false is to double click a word. This is the opposite of just setting the locktext to true, one can drag and select, but multi clicks don't select. getting the selectedtext of field "whatever" does indeed work. (and you could turn off the focusborder too) My guess is that despite the hilite that appears when traversal is off, the text isn't actually selected. To test this, I had a button set the selection, made sure that traversal was off, then put the selectedtext of the field, and it worked as expected. So, I'd call it a bug. Either a) one shouldn't be able to faux select in that mode, or b) it should be an actual real selection which it obviously is not. On Fri, Feb 24, 2017 at 10:26 AM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > I'll submit one. > > Bob S > > > > On Feb 24, 2017, at 09:21 , Mike Bonner via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Nevermind, it doesn't work, and I think it should. Enhancement request? > > Bug? > > > > On Fri, Feb 24, 2017 at 10:16 AM, Mike Bonner> 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@lists.runrev.com> wrote: > >> > >>> Hi all. > >>> > >>> The Short Version: > >>> > >>> Is there a way to get the hilited text for a control without focus? > >>> > >>> > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
I'll submit one. Bob S > On Feb 24, 2017, at 09:21 , Mike Bonner via use-livecode >wrote: > > Nevermind, it doesn't work, and I think it should. Enhancement request? > Bug? > > On Fri, Feb 24, 2017 at 10:16 AM, Mike Bonner 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@lists.runrev.com> wrote: >> >>> Hi all. >>> >>> The Short Version: >>> >>> Is there a way to get the hilited text for a control without focus? >>> >>> ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
Nevermind, it doesn't work, and I think it should. Enhancement request? Bug? On Fri, Feb 24, 2017 at 10:16 AM, Mike Bonnerwrote: > 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@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@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: The selectedText for controls without focus
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@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@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
The selectedText for controls without focus
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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode