Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Label property - Enabled?

Status
Not open for further replies.

jean2002

Technical User
Joined
May 1, 2003
Messages
75
Location
DE
Hello everyone,

Can someone tell me if it is in anyway possible to simulate the Enabled property for a Label control?

What I want to do, is as following: I have a form, with an Option Group. Above this option group, there is a label (e.g. lblAsk1) which asks a question, which the user then selects the chosen option box.
Then, below this option group, there is another 2 option groups, corrresponding to the 2 options above. I would like to enable only the option group that corresponds to the user's selected option.
BUT, within these two option groups, there are Label controls (e.g. lblAsk2 & lblAsk3). How do I set up the labels to look like when I set the Option Group' Enabled property to False? In other words, can I also make the labels lblbAsk2 or lblAsk3 appear dimmed? The Enabled property is not under a Label's Data Properties.

Thanks!
 
Have you looked at the labels forecolor and backcolor properties as well as the various border properties. you can pretty much make a label appear any way you want by setting those properties.
 
Thanks!

I sort of knew that I would have to do it that way, I just thought there might have been an easier way.
 
Ms. A. lables can (often are) "associated with a control. This is the attribute which underlies the "Hot Key" moving the focus to (or activating) controls. The lables' "parent" is the associated control, with some of hte parent controls' properties being inherited 9or controlled) from the parent control. If you set the (parent) control's Property for enabled, the child controls will also react to that property setting.




MichaelRed
mlred@verizon.net

 
OK, Thanks.

So now as I understand it, for example, an option group has a label too when created, and then the option group is the parent for this label.

Can one then set the parent property on an object? Can I make any label a child of any other control(that can be set disabled)?

Thanks again!
 
Not sure that I fully understand your latest (post). I suggest that you simply "Try" some of the various possabilities inherent in the concept of parent-child controls (what happens to child when parent properties are manipulated / what happens to parent properties when child is manipulated) It will be far more revealing than any brief discourse I might offer, and you will probably retain the knowledge longer. Suffice to say that it is quite useful as well as interesting. Option groups are, a good one to try withm

The association of controls (parent - child) varies a bit beetween versions, so you should explore that through resources specific to the version (and any updates) to youor installed software.




MichaelRed
mlred@verizon.net

 
What I was trying to say, was this:

Is there in the properties of a control, something you can change where a control is made to point to a parent control?
For example, I create a normal label, and then later I want this label to also be a child of some option group.

I know that one can just create an option group and a child label comes with it automatically, but what if I want to have more than one child label of the option group?

Will try out some more, thanks for your help anyway.
 
Hey there Jean2002!

I've had this problem and had great responses to it.

Search for posts that have ZiiX in them and you'll see the replies.

Shane
aka ZiiX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top