Hello,

I have been using this code for years and never had a problem until now.

I put this code in the RightClick method of my textbox and editbox base
class.

LOCAL llNoTextSelected, llClipboardEmpty, llNothingToSelect

* Don't let them copy if there's no text selected or it's a password
llNoTextSelected = EMPTY(this.SelLength) or not EMPTY(this.PasswordChar)
* Don't let them paste if there's nothing to paste or the control's
read-only
llClipboardEmpty = EMPTY(_cliptext) or this.ReadOnly
* Don't "Select All" when there isn't an "All"
llNothingToSelect = EMPTY(this.Text)

DEFINE POPUP shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR _med_copy OF shortcut PROMPT "Copy" SKIP FOR llNoTextSelected
DEFINE BAR _med_cut OF shortcut PROMPT "Cut" SKIP FOR llNoTextSelected
DEFINE BAR _med_paste OF shortcut PROMPT "Paste" SKIP FOR llClipboardEmpty
DEFINE BAR 6 OF shortcut PROMPT "\-"
DEFINE BAR _med_slcta OF shortcut PROMPT "Select All" SKIP FOR
llNothingToSelect
ACTIVATE POPUP shortcut


It usually works great, but not when I click on a DBI tree or list control
without clicking on the popup.

So the user right clicks on the text box and the popup menu displays fine.

But if the user does not click on one of the popup options but rather clicks
on the DBI tree or list I get an error
llNoTextSelected or llNothingToSelect not found.

I have tried to put this code in the lostfocus of the text box, but it does
not help
deactivate popup shortcut
release popup shortcut

Any ideas on how to fix this error ?

Thanks,
Kent


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to