Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh in CommandGroup question.
Message
From
19/05/1998 12:46:17
Rex Mahel
Realm Software, Llc
Ohio, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00100142
Message ID:
00100359
Views:
41
David,

In the click event of my form I have:

thisform.CommandGroup1.Refresh()

The only code executed when I click the button is the CommandGroup refresh method, none of the button refresh code is run.

A thisform.refresh works as expected, but the form I am using has too many controls that do not need to be refreshed.

Thanks
Rex

>Rex,
>
>It must be something you are doing. This form works fine in VFP3 build 0711 for me. Each form click the caption of the first button changes:
>
>**************************************************
>*-- Form: cform (e:\vfp3app\misc\cmgtest.scx)
>*-- ParentClass: cform (e:\vfp3app\ccontrol.vcx)
>*-- BaseClass: form
>*
>DEFINE CLASS cform AS cform
>
>
> DoCreate = .T.
> Name = "cform"
>
>
> ADD OBJECT commandgroup1 AS commandgroup WITH ;
> ButtonCount = 2, ;
> Value = 1, ;
> Height = 70, ;
> Left = 24, ;
> Top = 24, ;
> Width = 104, ;
> Name = "Commandgroup1", ;
> Command1.Top = 5, ;
> Command1.Left = 5, ;
> Command1.Height = 29, ;
> Command1.Width = 94, ;
> Command1.Caption = "1", ;
> Command1.Name = "Command1", ;
> Command2.Top = 36, ;
> Command2.Left = 5, ;
> Command2.Height = 29, ;
> Command2.Width = 94, ;
> Command2.Caption = "Command2", ;
> Command2.Name = "Command2"
>
>
> PROCEDURE Refresh
> ? program()
> ENDPROC
>
>
> PROCEDURE Click
> this.Refresh()
> ENDPROC
>
>
> PROCEDURE commandgroup1.Refresh
> ? program()
> ENDPROC
>
>
> PROCEDURE commandgroup1.Command1.Refresh
> ? program()
> this.Caption = alltrim( str( val( this.Caption ) + 1 ) )
> ENDPROC
>
>
> PROCEDURE commandgroup1.Command2.Refresh
> ? program()
> ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: cform
>**************************************************
>
>>Sorry, I'm using VFP3. I just added a command group to a form, changed the captions of the buttons in the refresh event and added another button with a commandgroup refresh in the click event. Run the form, click the refresh button, and only the refresh of the commandgroup is run, no button refresh.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform