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:
00545238
Views:
13
Hint taken < grin >. How rude of me not to have marked the message! Thanks again for your help.

George

>>That is a great idea. I can think of a few places where that would be handy for some of my apps. I am going to have to look into that.
>>
>>But, for this listbox I just ran into a problem. Every listbox has a different RowSource. I'll have to see if I can come up with a way to programmatically set the RowSource at run time.
>>
>>Now look what I've gone and done...I could have simply gone to each listbox and added the code and would have been done by now. Now I am going off on a journey to do this properly. Hehehe, so much for saving time. But heck, "do it right the first time"! Thanks for your help, Nadya.
>
>
>Yes, looking from another angle to the problem may help :) BTW, does this great idea deserve something? (hint) :)
>
>>George
>>
>>>>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
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Previous
Reply
Map
View

Click here to load this message in the networking platform