Context popup menu removes focus from text field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Context popup menu removes focus from text field
I have a text field for basic text entering and I've created a context sensitive popup menu to perform functions such as 'cut and paste'. However when the popup appears the text field loses focus and any text selections made disappear so there is nothing to cut or copy and the cursor disappears so I cannot paste. How do I stop this behaviour?
Less of an issue - but how do I change the cursor back to an arrow when navigating the popup menu - it remains as a text edit icon (as it does in the Live Code IDE editor actually).
Less of an issue - but how do I change the cursor back to an arrow when navigating the popup menu - it remains as a text edit icon (as it does in the Live Code IDE editor actually).
Re: Context popup menu removes focus from text field
Hi Andy,
problem is that new popup menu buttons have their TRAVERSALON property set to true!
This will cause the focus to go to the button and the text selection will disappear
Unfortunately this cannot be set in the inspector, so you need to use the message box:
set the traversalon of btn "your popup button here" to false
That should ease your pain
Clicking in the field returns to text edit icon again? Hm, that should in fact work correctly automatically
Best
Klaus
problem is that new popup menu buttons have their TRAVERSALON property set to true!
This will cause the focus to go to the button and the text selection will disappear

Unfortunately this cannot be set in the inspector, so you need to use the message box:
set the traversalon of btn "your popup button here" to false
That should ease your pain

Here I get the arrow when using the popup but it turns back to the LC EDIT tool icon after releasing the mouse!?but how do I change the cursor back to an arrow when navigating the popup menu - it remains as a text edit icon (as it does in the Live Code IDE editor actually).
Clicking in the field returns to text edit icon again? Hm, that should in fact work correctly automatically

Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Context popup menu removes focus from text field
Set the traversalOn of the button to false.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Context popup menu removes focus from text field
Yes, RichardFourthWorld wrote:Set the traversalOn of the button to false.

-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Context popup menu removes focus from text field
Wow. Two messages came in close together. Never seen that on the Internet before. 

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Context popup menu removes focus from text field
Thanks gentlemen for you prompt replies - my context menu now works fine. However I still have the cursor issue - oddly I have the same behaviour in the Live Code IDE script editor under Windows 7 (hovering over the context menu still gives me a text edit cursor).