Make forms label disabled

  • Thread starter Thread starter moondaddy
  • Start date Start date
M

moondaddy

When a label is associate with a control such as a text box and I disable
the textbox, then the label looks and behaves the same way where it looks
grayed out and wont respond to mouse events. Well, I have some labels that
aren't associated with any control and I'm using them as custom command
buttons with a richer gui. In some cases I need to disable these label and
was hoping there was a way to simply disable them rather than write a ton of
code to modify their appearance and flags to exit the mouse over, down, and
up events when I want them to behave as though they are disabled, and visa
versa.

Any good ideas?
 
A dirty fix might be to use labels associated with textboxes, but make the
textbox 1 twip wide and high, and position it behind the label, or somewhere
it cant be entered.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Hi,

An unassociated label cannot be disabled; you can try to attach the label
to a control:

1. Open the form in design view.
2. Cut the label to clipboard.
3. Select the control you want it attached to.
4. Paste (Ctrl+V).

We can also simulate the effects if necessary, by altering the label
control's ForeColor and BackColor properties.

Please feel reply to the threads if you have any concerns or questions.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "moondaddy" <[email protected]>
| Subject: Make forms label disabled
|
| When a label is associate with a control such as a text box and I disable
| the textbox, then the label looks and behaves the same way where it looks
| grayed out and wont respond to mouse events. Well, I have some labels
that
| aren't associated with any control and I'm using them as custom command
| buttons with a richer gui. In some cases I need to disable these label
and
| was hoping there was a way to simply disable them rather than write a ton
of
| code to modify their appearance and flags to exit the mouse over, down,
and
| up events when I want them to behave as though they are disabled, and visa
| versa.
|
| Any good ideas?
|
| --
| (e-mail address removed)
|
|
|
 
Back
Top