Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enable or Visible Event ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00058138
Message ID:
00059187
Views:
35
>>>>>Hi to all,
>>>>>maybe there is no answer to my question but I try ...
>>>>>
>>>>>I want to trap (by an event or other) when the Enabled or Visible property/status change.
>>>>>Think to write a control in a VCX and you want to know when the application code change you Enabled status, (without modify the application code, like calling a Enable() method)
>>>>>
>>>>>Thanks in advance, any suggestion will be appreciate,
>>>>
>>>>
>>>>There is a programmatic change event that can be fired. I'm
>>>>actually not that familiar with it. But hopefully that is the
>>>>kind of thing your looking for.
>>>>
>>>>Dan
>>>
>>>Programmatic change watches the value in a control. It is fired when the value is changed from code, and interactive change is fired when the user changes the value. It cannot be used to watch the values of other properties
>>
>>
>>Alright, thanks for the info. If that is true though and if I'm
>>reading the question correctly and he is programatically changing
>>the Enabled or Visible status, all he would have to do in
>>addition to changing these properties would be to change a value
>>in a control. This would in turn trigger the programatic change.
>>I know . . . a lot of extra work when this can be handled much
>>better with a timed event. Just curious if this could work.
>>
>>Dan
>
>I think it could work, but it misses the point. Probably the reason that he wants a virtual 'event' for the changing of these values is so that code can be fired automatically when the value of the properties change. There could be several different places in form, formset, toolbar or anywhere that toggle the enabled property for a given control, and the only way to make sure that your code gets fired when _anyone_ toggles the value is to make a 'virtual' event from a timer.

If there are numerous instances in which (based on varying criteria)
the enabled/visible properties can be changed, would it not make sense
to have a single custom method that any controls that affect the
setting can call? In this way, any code relative to a change in the
setting can be dealt with when the change occurs instead of having
to contend with a timer that is constantly firing in order to
determine if something 'should be' done.

For example, if the values of three out of ten textboxes on an
interface are used to determine whether a command button should
be enabled/visible, could the three textboxes not call a method
'SetEnabled()' that would perform some type of evaluation and
set the property/properties accordingly?

Dan
Dan
St. Petersburg, FL

"I started out with nothing and I still have most of it left"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform