Hi Mark
It works ....just what I wanted. I implemented it so that the user
cannot cut, but can paste into a listbox, with normal functionality
in the editfields. So, I assume the default for RB is always have
copy/cut/paste return false? ( ie enabled).
Michael.
On Dec 13, 2006, at 4:06 AM, Mark Nutter wrote:
--- Michael <[EMAIL PROTECTED]> wrote:
Could anyone help me understand the following.
Lels say a window has 2 controls, eg Editfields.
In one editfield, I would like to implement copy but no paste,
as an
example, while in the other ef I wold like to have paste but no
copy.
How does one implement this? Or is this not as straight forward
as it
sounds.
Here's one way to do it:
Add 2 boolean properties to your window. Call them NoCopy and
NoPaste and have them both default to False.
For the no-paste editfield, add code to the GotFocus and
LostFocus events. The GotFocus event should set NoPaste to True
and the LostFocus event should set NoPaste to False.
For the no-copy editfield, do the same, except the GotFocus event
should set NoCopy to True, and the LostFocus event should set
NoCopy to False.
Now for the Window itself, in the EnableMenuItems event, add
EditCopy.Enabled = not NoCopy
EditPaste.Enabled = not NoPaste
Double negatives may be bad English grammar, but they work just
fine as RB code. ;-)
Mark Nutter
Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/
______________________________________________________________________
______________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>