Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit scx to add method code
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00544876
Message ID:
00544919
Views:
16
>Hi Nadya,
>
>You are absolutely correct. I should have created a class for the listbox and used that. I kind of got carried away when creating this and realized too late that the class route was appropriate. The problem now is I have the form created with all of these containers and listboxes. I guess I can try changing the Class and Baseclass fields in the scx and see if that works.

Yes, this is what I usually do. Say, quite recently I found similarity in three of my applications. I created a new form's class called AddressForm in the common classlibrary, which I call nAdditions. I then opened each form in those applications as DBF and repointed it to my form (changed class and classloc). I believe, there is a utility for this purpose, but I always forgot its name, so I do it manually [Is it the new file, Glen uploaded yesterday?]
Then I checked methods and properties of the form in each application and reset most of all to default(), since it was already handled by the form class. So, I simplified my applications significantly. The only little problem here, that I don't have an access to these methods in Edit form window (it would be nice to see parent code here and I believe, it's done in VFP7, but we don't have it here yet).

>>George,
>>
>>If I have this problem and the DoubleClick event is the same for all these listboxes, I would make a class for this listbox with this method.
>>
>>>I have a form with many containers stacked on top of each other. Each container has a listbox. I need to add a couple of lines of code to the DblClick event of the listboxes and would prefer not having to go to each in the designer and add the code.
>>>
>>>I opened the scx and did a REPLACE on the Methods memo fields for the listboxes. I then compiled the form. When I go into the form designer the code exists in the DblClick method for each listbox but it does not seem to fire. The only one that fires is the one I did directly in the form designer. Did I miss a step or is it even possible to add method code in this manner?
>>>
>>>Thanks for you help.
>>>
>>>George
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