Solved

Enable copy and pasting even when textbox is disabled

Posted on 2016-11-18
2
33 Views
Last Modified: 2016-11-18
Hello,

How can I Enable copy and pasting even when textbox is disabled.
Cheers
0
Comment
Question by:RIAS
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41893073
by making a textbox "ReadOnly=True" instead of "Enabled=False", you will be able to highlight from the textbox and copy the selection to the clipboard.

but a disabled textbox or a readonly textbox cannot be the target of a paste.

maybe you can add a button next to your textbox that will read the content of the clipboard and assign the .Text property of your textbox.

what is your scenario? it doesn't seem right to allow a user to paste a value in a textbox but preventing from typing!
0
 

Author Closing Comment

by:RIAS
ID: 41893077
Worked!!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question