Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best way to do this?
Message
 
 
À
13/12/2000 22:06:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00453170
Message ID:
00453220
Vues:
27
Alex,

Here's the opg.Init()
bOptionGroup::Init()

set classlib to ccontrol additive

for each oButton in this.Buttons
   lcName = "lbl" + this.Name + oButton.Name
   this.parent.AddObject( lcName, "opgLabel", this, oButton )
   loLabel = eval( "this.parent." + lcName )
   with loLabel
      .Visible = .t.
   endwith
endfor
* Here's the opgLabel code:

* Init()
lparameter oOptionGroup, oButton

local lnWidth

with this
.Top = oButton.Top + oOptionGroup.Top + 1
.Left = oButton.Left + oOptionGroup.Left + 25
.mcSetValue = left( oButton.Caption, 1 )
.mcOptionGroupName = "this.parent." + oOptionGroup.Name
.mcButtonName = .mcOptionGroupName + "." + oButton.Name
.Caption = substr( oButton.Caption, 2 )
lnWidth = oButton.Width
oButton.AutoSize = .f.
oButton.Caption = .mcSetValue
oButton.Width = lnWidth
endwith

* Click()
local loObject

loObject = eval( this.mcOptionGroupName )
loObject.Value = this.mcSetValue

loObject = eval( this.mcButtonName )
loObject.SetFocus()


You should be able to tweak it and use the hotkey on the label and the value to store.

>Sounds like a perfect class for the situation. Would you share it? Could it be changed it so that the HotKey, if any, becomes the value stored?
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