• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

Enable copy and pasting even when textbox is disabled

Hello,

How can I Enable copy and pasting even when textbox is disabled.
Cheers
0
RIAS
Asked:
RIAS
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
RIASAuthor Commented:
Worked!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now