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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

containers and textboxes

Status
Not open for further replies.

bomoco

Programmer
Nov 1, 2005
2
US
If I create a command button group then drag the group, the buttons are included.

I need to do the same with a container that contains textboxes and labels, but I forgot how to do it.

Here's what I want to do. Upon entering a form, make all the textboxes disabled. Then, when they click the Edit button, it makes them enabled. I assume if I put the textboxes in a container, then container.enabled will do everything in one line of code. But I forgot how to make the textboxes part of the container.

Or is there another way to do this?
 
I assume if I put the textboxes in a container, then container.enabled will do everything in one line of code. But I forgot how to make the textboxes part of the container.

You assumed wrong. Enebling the container will only do that. If your textboxes are disabled, enabling the container will not automatically enable your textboxes. You might consider using thisform.setall() to enable all textboxes with one line of code. Look at the help file on this.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 

Bomoco,

First, I suggest that you make them read-only rather than disabled. Read-only looks better, and has the advantage that users can select the text.

I would also forget about containers. They will just add an unnecessary complication. Instead, use the form's SetAll method to change the Readonly (or Enabled) property:

Code:
THISFORM.SetAll("Readonly", .T., "textbox")

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks to all, that answered my question!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top