Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WizStyle
Message
From
03/09/1998 05:31:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00132678
Message ID:
00132683
Views:
28
>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) :
* if create class is used
use mybillingform.scx
replace class with "myTxtBtns", ;
    classloc with sys(5)+curdir()+"myClassLib" ;
    for class = "txtbtns"
 use
* if add class is used
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform