>Can anyone suggest how to subclass Wizstyle and modify it to allow carring forward info from previous record in a form when useing the txtbtns.vcx part of Wizstyle?
>I have tried numerous things, but nothing work correctly, even Set Carry On ( of course, I may not be adding it in the right area).
>
>TIA,
>Dan
Dan,
Many ways there could be. I don't play with wizards so internal code might not be applicable to all of the ways :
1)You could directly modify the cmdAdd.click code
scatter memvar memo
dodefault()
gather memvar memo
2)You could subclass wizstyle.vcx txtbtns class or have a copy of it to modify :
* Subclass
CREATE CLASS mytxtbtns OF myClassLib AS txtbtns FROM (home()+"wizards\wizstyle.vcx")
* Copy
ADD CLASS txtbtns OF (home()+"wizards\wizstyle.vcx") to myClassLib
In both cases if myClassLib.VCX doesn't exist it's created. In first you'll have a subclass named myTxtBtns and in second it would be a copy (code could be seen and edited) named txtbtns. Choose either way (second might be easier to handle and if you fully make it the way you like totally replace the original with yours) then modify the class code using dodefault() if subclassed and needed (and you could also subclass your new class for picbtns to have icon buttons).
Now after modifying the class, form(s) also should know which class to use. Doing it in designer needs the old to be removed and new to be added, but in fact we only want to change its class name and class library (designer can't do that). Say your form is named mybillingform.scx. In command window (Form designer not open or "mybillingform.scx" is not the one in designer) :
use mybillingform.scx
replace class with "myTxtBtns", ;
classloc with sys(5)+curdir()+"myClassLib" ;
for class = "txtbtns"
use
use mybillingform.scx
replace classloc with sys(5)+curdir()+"myClassLib" ;
for class = "txtbtns"
use
3)"Set carry" migth be easiest if wizstyle.txtbtns class doesn't do something internally. Set carry is scoped to current data session. So you should have it in your form ie: dataenvironment.beforeopentables, form.load.
Cetin