Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to do this?
Message
From
14/12/2000 19:20:20
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453170
Message ID:
00453700
Views:
19
David,

Thank you very much for your generous sharing! I'll let you lnow how it comes out.

Alex


>Alex,
>
>one more try *g*
>
>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform