Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling controls
Message
From
21/05/2001 04:53:00
 
 
To
21/05/2001 01:20:44
General information
Forum:
Visual FoxPro
Category:
Visual ProMatrix
Miscellaneous
Thread ID:
00509330
Message ID:
00509350
Views:
24
Hi!

There are a lot of solutions for this, but neither is good:
- Make an error handler that ignores the error that occurs when form loads and control source for some control do not exists.
- Make a cursor in the Load event using CREATE CURSOR command. Include all fields required in this cursor. Bind offending fields to this cursor, while all otehr fields will be tied to the existing fields.
- Just clear control source property of these fields and copy it to the Comment property of the control. This way control will not blow up form, as well as you have the correct information about what source field used in old application for that control.

In addition, there are Enabled and Visible properties to make controls unavailable for editing by users (this do not solve problem with absent fields, but just rules the appearance).

HTH.

>Hi VFP users & gurus
>
>I need to be able to disable some data controls such as textboxes to make my application backward compatible. Normally, application will bomb if the field to which the data control is tied to, doesn't exist. Thanks.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform