Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically dropping / adding form objects every 60 seco
Message
 
 
To
02/08/2007 15:08:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01245612
Message ID:
01245622
Views:
23
This message has been marked as the solution to the initial question of the thread.
Margaret,

Sure you can remove/add buttons programmatically. See NewObject() /RemoveObject() methods in help.

However, it would be easier, I think, to hide/show the buttons instead by manipulating their visible property.

>I have a Foxpro 2.6 application that I am converting to VFP 9. The main form of the application is designed for a touch screen. The screen is filled with buttons and each button represents a job or a person that is located in a work center. The old program completely redraws the buttons, which are labels, every 60 seconds. I need the same functionality in the new application and want to use command buttons.
>
>My problem is that the job buttons are one size and the employee buttons are much smaller. The form has five rows of buttons. Each row holds 10 employee buttons or five job buttons. All the employees in the work center are displayed and then any open space that is left is used for the job buttons. The job buttons will go on the same row as the employee buttons if there is empty space on the row. If there are more jobs in the work center than can be displayed on the screen then page up and page down buttons are activated. Jobs are moved around constantly and there are a couple thousand jobs in circulation all the time so the jobs that are in the work center change constantly.
>
>Because the contents of all five rows will change every time the screen refreshes I am trying to figure out the best way to regenerate the screen. I cannot find a way to add and remove the button objects once the form is loaded which is what I would like to do.
>
>Is there a way to remove / add commandbuttons to a form in the refresh?
>
>Otherwise, my thoughts are that I can do one of these options;
>
>1) put 10 buttons on each row, if the button is for a job increase the size and hide the button next to it so only 5 buttons are visible. Seems messy.
>
>2) close and reopen the form every time it is refreshed so that each button is created at the correct size
>
>Is there an easier way to do this?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform