Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a record to a Table
Message
 
 
À
25/10/1998 06:10:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00147776
Message ID:
00150331
Vues:
39
John,

It's been a fun one to work on.

The cmdLabel class basically sets the MousePointer to the hand. It's Click event does a do form xyz with this. In it's Init it adds an invisible button behind itself so that the user has keyboard access to it. The button click just passes the message on to the cmdLabel.Click()

Here's it's Init()
cLabel::Init()

set classlib to ccontrol.vcx additive

this.mcButtonName = this.Name + sys(2015)
this.parent.AddObject( (this.mcButtonName), "cmdLabelButton", this )

local loObject

loObject = evaluate( "this.parent." + this.mcButtonName )
with loObject
   .Visible = .t.
   .TabIndex = this.TabIndex + 1
endwith
It also has a ChildFormClosing method which is a place for the child form to make a call back to as it closes so the cmdLabel could do something like Requery a view.

The child form can also disable the button, effectively allowing only a single instance of the child form, kind of a modeless pseudo-modality *s*

>Thanks for the reply. It sounds like a cool application. How does the "hyperlink" label launch a form?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform