If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Properties for read-only fields
I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions: 1. By default the field then becomes greyed-out which is fine in itself but we find that the shading is rather too heavy. I have tried editing the Back Color property but even though I enter a different colour code or choose one from the Custom Colours, it doesn't seem to take effect. Is it actually possible to influence the Back Colour of a disabled field, or is this fixed? 2. In addition to the Enabled property, what extra control does the Locked property provide? How does one use this, what effect does it have? Thanks CW |
#2
|
|||
|
|||
Properties for read-only fields
As far as I'm aware, there is no control over the appearance of a Disabled
field. Locked = Yes prevents the data in the control from being changed. Using Locked = Yes and TabStop = No is similar to setting Enabled = No without greying out the control. The user can still mouse click into the control, but cannot change it. You can add code to the OnEnter property to move the cursor to another control if necessary, or simply provide a muter background color to indicate that the control is unavailable for editing. Sprinks "CW" wrote: I know how to use the Enabled property (set as No) to prevent users editing a field on a form, but have two questions: 1. By default the field then becomes greyed-out which is fine in itself but we find that the shading is rather too heavy. I have tried editing the Back Color property but even though I enter a different colour code or choose one from the Custom Colours, it doesn't seem to take effect. Is it actually possible to influence the Back Colour of a disabled field, or is this fixed? 2. In addition to the Enabled property, what extra control does the Locked property provide? How does one use this, what effect does it have? Thanks CW |
#3
|
|||
|
|||
Properties for read-only fields
If you set Enabled = No and Locked = Yes, it will behave like a control with
Enabled = No, but have the appearance of a normal control. "CW" wrote: I know how to use the Enabled property (set as No) to prevent users editing a field on a form, but have two questions: 1. By default the field then becomes greyed-out which is fine in itself but we find that the shading is rather too heavy. I have tried editing the Back Color property but even though I enter a different colour code or choose one from the Custom Colours, it doesn't seem to take effect. Is it actually possible to influence the Back Colour of a disabled field, or is this fixed? 2. In addition to the Enabled property, what extra control does the Locked property provide? How does one use this, what effect does it have? Thanks CW |
#4
|
|||
|
|||
Properties for read-only fields
Apologies to CW and thanks to you, Klatuu. I was misinformed and have been
similarly frustrated in controlling the appearance of disabled controls. Thanks! Sprinks "Klatuu" wrote: If you set Enabled = No and Locked = Yes, it will behave like a control with Enabled = No, but have the appearance of a normal control. "CW" wrote: I know how to use the Enabled property (set as No) to prevent users editing a field on a form, but have two questions: 1. By default the field then becomes greyed-out which is fine in itself but we find that the shading is rather too heavy. I have tried editing the Back Color property but even though I enter a different colour code or choose one from the Custom Colours, it doesn't seem to take effect. Is it actually possible to influence the Back Colour of a disabled field, or is this fixed? 2. In addition to the Enabled property, what extra control does the Locked property provide? How does one use this, what effect does it have? Thanks CW |
#5
|
|||
|
|||
Properties for read-only fields
Thanks to both Sprinks and Klatuu for your clear explanations. Klatuu's
solution is perfect in itself, and on top of that it remains possible with these settings to manipulate the Back Colour i.e. to a lesser shade of grey, so that is visually apparent to the users that is read-only. The best of both worlds!! Thanks again CW "Klatuu" wrote: If you set Enabled = No and Locked = Yes, it will behave like a control with Enabled = No, but have the appearance of a normal control. "CW" wrote: I know how to use the Enabled property (set as No) to prevent users editing a field on a form, but have two questions: 1. By default the field then becomes greyed-out which is fine in itself but we find that the shading is rather too heavy. I have tried editing the Back Color property but even though I enter a different colour code or choose one from the Custom Colours, it doesn't seem to take effect. Is it actually possible to influence the Back Colour of a disabled field, or is this fixed? 2. In addition to the Enabled property, what extra control does the Locked property provide? How does one use this, what effect does it have? Thanks CW |
Thread Tools | |
Display Modes | |
|
|