Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Real problem with classes
Message
 
À
05/06/2001 22:57:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00515559
Message ID:
00516071
Vues:
14
>I am having a problem with classes. It has not been a problem for me in the past because I have only used them to drop on forms.
>
>My problem is that when I execute (in the command box):
>oObj = createobject('myclass')
>oObj.visible = .t.
>
>The object appears in its full glory in the debugger, but nothing shows on the screen...at all. This happens with every class that I try.
>
>Anyone have any ideas?
>
>BTW: if I try to execute: oObj.show(1), I get the error 'Property SHOW not found'
>BTW2: I have SP5 installed.
>Thanks, Randy


What base class are you subclassing your class of?

Your code will only work if the class is a 'stand-alone' class, such as a Form. All other control-classes (such as buttons and textboxes) have to be contained in a form or another container. In that case, you would use AddObject() instead. There are other classes, such as Custom or Session, that simply don't have a visible representation...

Markus




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform