Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

There are text boxes that, under ce 1

Status
Not open for further replies.

sashaDG

Programmer
Jun 20, 2022
112
BY
There are text boxes that, under certain conditions, should not be changed (enabled = .F.), but I do not like the gray color of the values.

Is there another way to disable the changes but keep the bright black values?
 
Have you tried changing the TEXTBOX DisabledForeColor to Black?

Regards,

David

Recreational Developer and End User of VFP for my personal use in 'Amateur Radio' and 'British Railways' related Applications.
 

Sasha,

or leave enabled but have the .when() method return false under those conditions.


that said, the idea of the disabled/readonly colour change is to indicate to the user that they can't/must't be changed.


hth

n
 
I would always go with ReadOnly rather than NOT Enabled. Not only is ReadOnly better cosmetically, but it allows the text to be selected and then scrolled or copied to the clipboard.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
As the others have said, you can get what you want, but one caveat. When you use ReadOnly or make the disabled colors match the enabled colors, you're taking away from the user the signal that this textbox isn't available right not. It's really frustrating to try to type into what looks like an enabled textbox and have it not work.

Tamar
 
Readonly is definitely less restrictive to users still enabling them to copy and paste, but also scroll through a value, if it's larger than the box size.

On the other side you have the colors under your control with DisabledForecolor and DisabledBackcolor. Just like there are Forecolor and Backcolor.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top