Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 - How to 'dim' checkbox when readonly
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00748931
Message ID:
00749286
Views:
22
Does seem that way.
I added a readonly_assign to a checkbox. Setting the back/fore colors to the Disabledback & disabledFore colors didn't get the same results as disabling it. Although I'd create the ReadOnly_Assign anyway to actually to the Enable/Disabling something like:

**
** chkReadOnlyDim.ReadOnly_Assign:
** If the developer sets the control to readonly, we also
** want to disable it.
**
Lparameters vNewVal
With This
.Enabled = !m.vNewVal
.ReadOnly = m.vNewVal
Endwith
Return



>Barring any other means to dim it, (hopefully someone will come up with another solution!), I do not see how you can make the checkbox readonly and 'dim' it without also disabling it.
>
>
>>Tracy,
>>
>>Basically the scenario is a 'master file maintenance' type of form.
>>Certain fields will not be able to be edited after the record is saved.
>>For other controls, eg textbox, the control is 'readonly' after the initial save but still 'enabled'.
>>This allows the end-user to still access the control (for ctrl/c).
>>Are you suggesting that I disable the checkbox instead of making it 'readonly' as in the other controls? After all, who would want to do a ctrl/c on a checkmark?
>>
>>>Yep, you are correct. Changing enabled to .F. does the trick.
>>>
>>>Tracy
>>>
>>>>Tracy,
>>>>
>>>>Nothing that I can see in terms of the control being 'readonly'.
>>>>However, when I 'disable' the control, it dims.
>>>>
>>>>
>>>>>What happens if you make the DisabledForeColor=0,0,1 in the property sheet?
>>>>>
>>>>>
>>>>>>I have been trying, in vain, to have a checkbox (in VFP7) 'dim' when it is read-only.
>>>>>>
>>>>>>I have changed * all * of the properties containing colors to 236,233,216 in the control, readonly to .t. and enabled to .f.
>>>>>>However, the checkbox itself still remains white.
>>>>>>When it is clicked on, it 'dims' until the mouse is released.
>>>>>>
>>>>>>I would like this control to be consistent with other controls in my app that dim when readonly.
>>>>>>
>>>>>>Thank you in advance.
Mark S. Swiencki
EPS Software www.eps-software.com
mark@eps-software.com
Previous
Reply
Map
View

Click here to load this message in the networking platform