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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help creating a class for checkbox group

Status
Not open for further replies.

Judi201

Technical User
Jul 2, 2005
315
US
Hi!

I am back with another 'mental black hole' I want to use a series of checkboxes in several situations. So, I was delighted to read thread1254-1120159 and decided that I wanted to use a container and put my 5 checkboxes there, set it up as I wanted them to look and function and save that as a class.
When I did that, I could not change the names of the individual checkboxes, just the caption and name of the group. Could someone tell me what I am doing wrong? I have a rootclass just copied from the base classes, then myclass derived from the root class. I used mychkbox to form the group that I saved as MyChkBoxGrp. Thought I could come back and name the individual chkboxes as I needed. Or, will I have to make each set as a class? Or, do you use a generic name for reference when creating a class like this.

Is this another time that I am spending too much time on a non-issue? <g> I am good at that.

Thanks for all input.

Judi
 
1. you cannot rename the name of the classes.
2. But you can set the caption.
It is the caption which will be displayed to the user. And so that is fine.

Just because, the name cannot be changed, you dont have to create separate set of classes. So long the funcy\tionalities are same, you can continue to use the same class.

Use a generic name is fine.
:)

____________________________________________
ramani - (Subramanian.G) :)
 

Judi,

What you are seeing is perfectly correct.

When you create any kind of container class, the names of the contained objects become part of the class definition, and they cannot be changed lower down the class hierarchy.

If that was not so, it would become possible to break any existing code in the class that refers to the names. For the same reason, you cannot delete a contained object from within a subclass or instance (but you can make it invisible).

The trick is choose the names carefully in the first place.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 

Hey Ramani ... where have you been these last few months? We've missed you.

I tried to email you recently (can't remember why .... nothing important), but you got bounced.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks for the quick response. I somehow had this confused by what I thought I had done in my navigation bar but reviewing with your response in mind, shows that I had not renamed the buttons. As I thought, my loss of concentration is the villian.

Thanks for keeping me on track.

I often want to thank many of you for the help I get by reading past posts and don't know how. So to all of you who answer all of our questions, intelligent and otherwise [smile], Thank You ALL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top