Hi all. I'm relatively new to VFP7 & am converting old 2.6a code. Was wondering if it would be possible to take a main form with command buttons, pass parameters to those buttons & save the old values so when the user exits the routine, the buttons are reset to their original values. I have accomplished this by the code below, however what I can't figure is how to work it if there is program nesting. Example, I click "View" and that does inv_view, well inv_view has buttons I can click to do yet another proc, inv_detail. What I have can save the button config from main to inv_view & restore them when a user exits. What I need is to be able to save the 1st set of variables & also the second set so I can exit inv_detail & the buttons will return to the inv_view set, exit that & they return to the main set. Sorry if this is confusing.
Proc mk_form
parameters lcd2, lcd3, lcd4, lcd5, lt_1, lt_2, lt_3, lt_4
Public lcdw2, lcdw3, lcdw4, lcdw5, lt1, lt2, lt3, lt4
lcdw2 = lcd2
lcdw3 = lcd3
lcdw4 = lcd4
lcdw5 = lcd5
do form history name hist linked with lcdw2, lcdw3, lcdw4, lcdw5, lt1, lt2, lt3, lt4, lt5
The init event of the form paints the buttons so to speak. The Proc reads
do mk_form with prg1, prg2, prg3, prg4, label1, label2, label3, label4
The end of prg1 reads the same way, do mk_form with ...
then return.
Sorry for the length. Do I need to use an array? If so, can you provide an example as I'm green when it comes to those.
Also, I don't really want to use a toolbar but if there's not other way then I'll have to give it a whirl. My customers are used to the command buttons. I relate this to pushing keys & then popping them in the old 2.6 code. I was able to push levels of custom keystrokes & revert by popping the keys off the stack. Any help would be appreciated. Thanks!
Proc mk_form
parameters lcd2, lcd3, lcd4, lcd5, lt_1, lt_2, lt_3, lt_4
Public lcdw2, lcdw3, lcdw4, lcdw5, lt1, lt2, lt3, lt4
lcdw2 = lcd2
lcdw3 = lcd3
lcdw4 = lcd4
lcdw5 = lcd5
do form history name hist linked with lcdw2, lcdw3, lcdw4, lcdw5, lt1, lt2, lt3, lt4, lt5
The init event of the form paints the buttons so to speak. The Proc reads
do mk_form with prg1, prg2, prg3, prg4, label1, label2, label3, label4
The end of prg1 reads the same way, do mk_form with ...
then return.
Sorry for the length. Do I need to use an array? If so, can you provide an example as I'm green when it comes to those.
Also, I don't really want to use a toolbar but if there's not other way then I'll have to give it a whirl. My customers are used to the command buttons. I relate this to pushing keys & then popping them in the old 2.6 code. I was able to push levels of custom keystrokes & revert by popping the keys off the stack. Any help would be appreciated. Thanks!