Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Showing hiding some command buttons
Message
From
11/04/2009 09:03:21
 
 
To
10/04/2009 22:59:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01394306
Message ID:
01394325
Views:
67
>I have series of buttons in my command group. When clicked, this should bring some other buttons (not contained in a command group).
>
>When command1 in commandgroup is clicked, command1.. command2 should show up and others hidden..
>When command2 in commandgroup is clicked, command3.. command6 should show up and others hidden (command1 and command2)
>
>I'm used to writing in each clicked event.. command3.visible=.f., command4.visible=.f. etc and using SETALL to disable all command buttons then setting the visible property to .T. for all command buttons in the commandgroup.
>
>Any better way to approach this?
>
>I have 8 command buttons in my command group and more than 10 other command buttons..

First, I'd stay away from command groups. They really don't give you any value over individual buttons.

Second, my basic form class has a method called EnableControls. I put code there that determines which controls to enable and disable and then call that method when needed.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform