Solved

Enable copy and pasting even when textbox is disabled

Posted on 2016-11-18
2
44 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display

751 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