VFP6.0
I need to make a wizard-like program...
There are several steps that need to be completed in order.
Steps cannot be skipped!
First I tryed to fit everything on one form.
Everything wouldn't fit! Plus there are some steps that need to be done before others so it was a mess.
Next I tryed to place controls in the same space and hide/show the controls of a particular step as needed at runtime. This became a mess in the form designer with a bunch of controls on top of each other all jumbled together.
So I abanded that approach
Next I tryed formsets which seemed perfect for this program.
Make a top level form and smaller forms inside for each step with no caption or border. Seemed workable. I made a "main" form as top level and planned to run each step form inside of it hiding/showing as needed. I couldn't get the forms for each step to show inside the main form. I had to make them "as" top level instead of "in" a top level form so then when they appeared they weren't part of the main form so if you moved the main form they stayed put.
So I gave up on formsets...
Then I tryed pageframes...
Place each step on a page and move between them as you go.
But the user could skip steps by clicking on the tabs of the later steps. So I turned the tabs off and re-compiled. Even though there were no tabs you can click where the tabs are supposed to be and guess what? Focus changes to that page LoL. Maybe a glitch in VFP? So my final solution was to move the pageframe up beyond the forms area so the tab portion would not be visible/clickable at all by the user. They would be behind the titlebar per say. This seems like a rigging approach but it will work I guess...
I thought about multiple forms but I need some common controls (next, back, etc..) that would have to be added to every form. Basically copies of the same buttons and if I ever had to change the code in one I'd have to go into every form and change it in all of the buttons.. another mess!
So I guess my question is.. is there an easier way? A better way? A faster way? A way that is not so... rigged?
thanks for reading this book
I need to make a wizard-like program...
There are several steps that need to be completed in order.
Steps cannot be skipped!
First I tryed to fit everything on one form.
Everything wouldn't fit! Plus there are some steps that need to be done before others so it was a mess.
Next I tryed to place controls in the same space and hide/show the controls of a particular step as needed at runtime. This became a mess in the form designer with a bunch of controls on top of each other all jumbled together.
So I abanded that approach
Next I tryed formsets which seemed perfect for this program.
Make a top level form and smaller forms inside for each step with no caption or border. Seemed workable. I made a "main" form as top level and planned to run each step form inside of it hiding/showing as needed. I couldn't get the forms for each step to show inside the main form. I had to make them "as" top level instead of "in" a top level form so then when they appeared they weren't part of the main form so if you moved the main form they stayed put.
So I gave up on formsets...
Then I tryed pageframes...
Place each step on a page and move between them as you go.
But the user could skip steps by clicking on the tabs of the later steps. So I turned the tabs off and re-compiled. Even though there were no tabs you can click where the tabs are supposed to be and guess what? Focus changes to that page LoL. Maybe a glitch in VFP? So my final solution was to move the pageframe up beyond the forms area so the tab portion would not be visible/clickable at all by the user. They would be behind the titlebar per say. This seems like a rigging approach but it will work I guess...
I thought about multiple forms but I need some common controls (next, back, etc..) that would have to be added to every form. Basically copies of the same buttons and if I ever had to change the code in one I'd have to go into every form and change it in all of the buttons.. another mess!
So I guess my question is.. is there an easier way? A better way? A faster way? A way that is not so... rigged?
thanks for reading this book