Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VfpTimePicker class
Message
 
 
To
04/01/2018 18:58:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01656967
Message ID:
01656977
Views:
47
>Hi
>2 solutions to change the olecontrol possibility to be enabled/disabled:
>
>1.add just a commandbutton on the form to switch between 2 states:enabled/disabled
>
>*in click event
>with thisform.olecontrol1.object
>.enabled=!.enabled
>endwith
>
>
>the key is "object" otherwise cannot change the dtPicker state.
>
>2.can be also a checkbox with this code
>
>*in interactiveChange() event
>thisform.olecontrol1.object.enabled=iif(this.value=1,.t.,.f.)
>
>
>the visual indication of a disabled control is that it is grayed and dont react to events (user or by code).

Hi Yousfi,

In our case this is a complex container based class. I don't think it uses Ole control at all, but I can double check. I just didn't want to change the class itself. I guess I may try to access class objects directly from the control - let me try that.

UPDATE. I don't see a way to access inner objects of this class directly from the form. I attached a picture of the class.

UPDATE2. I found that this class had readonly_assign method that set the date control to show disabled. I'll try that now. - Tried that - no visual effect. It is not very important, so doesn't really matter. The class seems to be using textbox and a button which calls the calendar.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform