Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OptionGroup error
Message
 
À
24/03/2006 08:01:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
01107241
Message ID:
01107344
Vues:
17
>I have changed it so that it is numeric, it still gives me the same error.
>
>In my init method I have thisform.r_rateuni = 2, I want the optiongroup to default to the second choice which is 'No'.
>
>the controlsource is thisform.r_rateuni.
>
>If I change the controlsource to a variable that is used in the optiongroups that was original on the form, thisform.r_chead it works fine. In the init method thisform.r_chead = "Yes"
>
>I have tried assigning thisform.r_rateuni the same way. I have also tried deleting the control and recreating it to see if something maybe got corrupted with it.
>
>Please....any help wwould eleviate a great deal of frustration at this point!

I have no such a problems, but I have only VFP9 to test, check this and tell me if this worked on VFP6:
PUBLIC oform1

oform1=NEWOBJECT("Form1")
oform1.Show
RETURN


**************************************************
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   03/24/06 03:58:03 PM
*
DEFINE CLASS Form1 AS form


	DoCreate = .T.
	Caption = "Form"
	test = .F.
	Name = "Form1"


	ADD OBJECT optiongroup1 AS optiongroup WITH ;
		ButtonCount = 2, ;
		Value = 1, ;
		ControlSource = "thisform.test", ;
		Height = 63, ;
		Left = 30, ;
		Top = 20, ;
		Width = 115, ;
		Name = "Optiongroup1", ;
		Option1.Caption = "Option1", ;
		Option1.Value = 1, ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Top = 5, ;
		Option1.Width = 61, ;
		Option1.Name = "Option1", ;
		Option2.Caption = "Option2", ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Top = 24, ;
		Option2.Width = 61, ;
		Option2.Name = "Option2"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 128, ;
		Left = 94, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Click me", ;
		Name = "Command1"


	PROCEDURE optiongroup1.Init
		thisform.Test = 2
	ENDPROC


	PROCEDURE command1.Click
		thisform.test = IIF(thisform.Test = 2,1,2)
		thisform.Optiongroup1.Refresh()
	ENDPROC


ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform