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() >>