Lets try this again - I now believe my current approach does not involve inheritance so my previous uses of Parent and Child were incorrect. What I have is an object creating and destroying a temporary object of a different class. What is the proper terminology for the objects I am describing? Creator and Temporary Creation?
At this point I see three approaches: 1. A single EditBox that changes sizes as appropriate. - This will require changing the event actions based on the state of the control but will eliminate the addressing problems. 2. A ListBox that creates and destroys a temporary EditBox. - This will require figuring out how to address the properties of the boxes from each other. 3. A Container with a ListBox and an EditBox that toggles between visible and invisible. - This will require learning how to use a container object and seems more complex. My goal is to have a reusable class with the functionality I need. It is also to learn how to work with VFP classes. Most of the replies I have gotten suggest the third approach. At this point I see it as forcing even more learning before success but it may still be the best/quickest approach. Is this a case where any one of the three approaches can work equally well and personal preference/experience determines the best approach or do 1 or 2 have flaws that mean they need to be abandoned? Thanks again - Joe >What I want to do is to emulate the feature in QuickBooks that is active >in any dollar amount field where one can enter "12.34 + 56.78 Enter" and >have the calculation result, "69.12", entered into the field. When a >user enters an operator, the program opens a control that overlays the >field and displays each line of the calculation on a line of its own - >emulating a paper tape adding machine. > >I have taken the approach of using a TextBox as the initial control. If >the user keys "10 Enter", 10 is accepted as the value and focus moves to >the next control in the tab order. If the user keys "10+", an EditBox >overlaying the TextBox is created. The EditBox is initialized with "10" >on the first line and "+" on the second line. When the user has >completed entry with an "Enter", the calculated result is written to the >Value property of the TextBox, the EditBox is removed, and focus moves to >the next control. >> I'm not sure if "child", "parent" and "subclass" are proper terminology >>so if what I say doesn't make sense feel free to question/correct me. I >>want to subclass a TextBox so that it can create an EditBox on the fly. >>I need the child EditBox to be able to read and write the parent TextBox >>properties. I started expecting to return parameters like one does from >>functions but suspect that won't work after a control has lost focus. >> >> I have a mockup partially working but am using a form method called from >>the TextBox to create the EditBox rather than a method on the subclassed >>TextBox. I don't know how to handle the naming in this situation. Do I >>need to worry about name collisions or will the system handle it for me? _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

