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

this control is read-only (on a data-form

Status
Not open for further replies.

DriesM

Programmer
Nov 25, 2001
16
BE
Hi all,

I have lot experience in fpd 2.6 and some in vb6.0 and now starting te learn fpw6.0, in advance to upgrade a large application. But starting is though.
One of my probs: when i create a form via form-wizard to let the user maintain single tables, i cant find a way to disable the read-only property of data-fields.
Yes there is a read-only property for every field, but its value doesnt seem to affect the behavior of the fields in the form.
Any suggestions?
(i only tested the forms via the command window, not in a full application)

thanks,
Dries.

p.s. i have MS VP6.0 Programmer's guide, it's a great book, but it doesnt seem to help me out here.

 
you can disable the field by setting its disabled property to .t., and you can make the backcolor the same color as the enabled ones.

That works for me.

I don't know if that's what your looking for


Good luck
TeknoSDS
 
I find it weird.
I dont see any "disabled" property.
There's only have a "DisabledBackColor" and "DisabledForeColor" property. They obviously don't contain a boolean, but a color value.

 
The "enabled" property has (by default) .t. for all data-fields.
That doesn't seem to help.
 
It's a little unclear to me exactly what you're doing, or want to do. But let me give it a shot.

When the form wizard creates, say, a data entry from for you, it adds the table to the data environment, which means it creates a cursor. By default this cursor will have it's read-only .f., because you'll generally want to use it for data entry.

Now I admit that trying to make one of the data entry controls read-only doesn't seem to work, at least it didn't when I tried it just now, but that may be because of the way the Wizard works. You can make it not work if you really need to keep a field safe, by either not including it in the original dataentry form created by the wizard and then adding another label or textbox where you control the read-onlyness of the data, or you can create a local view with the field(s) you want protected not being updatable and then let the wizard do it's thing using the wizard. When I tried that, the cursor shows the data having been changed, but the underlying table doesn't have the changes in the protected column.

If this is disconcerting you can probably do something to update your display after the navigation bar gets done with it. You may even be able to figure out how to do it in buttons class itself, though I didn't have any luck just now trying to do it.

Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top