Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Double Click
Message
From
06/02/2000 12:53:53
 
 
To
05/02/2000 23:27:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00327950
Message ID:
00328051
Views:
29
>>ALternatively, you can create a textbox class that will become your grid textbox class, and swap out the base textbox for yours at runtime. The disadvantage to this is that it prevents you from putting instance code in your textboxes if you need to.
>
>You could use a textbox class that delegates events to the gridclass. Something like: grid.ColumnClick(this, columnNumber) You could go a step further and create an array property in the grid that contains references to objects that handle the delegated events. The nice thing about delegation to an object is that you can change what event handle object is referenced at will. This is a nice way of handling different behavior for different operating modes, it removes any need for case structures in the event handlers for multiple states.

This is what I do most of the time, but you still have to have a textbox class that calls the grid's method, or you'll be writing that call in every box. And this still only lets you write common code for all textboxes in the grid, so if each one needs different behavior, you're writing a CASE statement to look at the calling object... this is not a nice way of handling it, but maybe the best design compromise.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform