Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define class programmatically
Message
 
To
12/11/2003 17:42:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00848966
Message ID:
00849404
Views:
30
I forget:-( It won't show unless it's visible [i hope!].

I am still trying to figure out why some properties may be set in the class definition while others are only writable in the object.

>Wasn't it that .AddObject()ed objects are invisible by default, and that you have to set the new object's .visible=.t. programmatically?
>
>>In a PRG somewhere ...
>>
Define class subclsComboBox as ComboBox
>>visible=.t.
>>top=n
>>width=n
>>...;etc
>>enddefine
>>
>>In your forms init event:
>>thisform.addobject('cboMyCombo','subclsComboBox')
>>
>>Now your form should display a combobox named 'cboMyCombo'
>>
>>Download #16575 demonstrates how to add PRG classes to a Visual Form.
>>HTH
>>
>>
>>>Thanks for your reply - what I am not sure about is how you get the combo box to actually appear. What part of your program does this? Do you have to have it as a form? I have a define class program, and when I run it nothing happens. When I run yours, the combo box and form appear. I have received some great responses to this question, but am a little embarrassed to indicate that I cannot follow the others suggestions since it is not "step-by-step" and I am not knowledgeable about what they are suggesting. Every suggestion leads me to a Foxpro book where I look up what they are suggesting but I am unable to get to "the next level" and solve my problem. Since
>>>I am not a great programmer, I usually need more help than the next guy. Any layman's help you can give would be greatly appreciated.
>>>
>>>Thank you
>>>
>>>Paul
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform