Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dblclick in a grid
Message
From
04/06/1998 03:37:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/06/1998 03:22:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00103883
Message ID:
00104595
Views:
24
>>>>>>I have code in the dblclick event of a grid. But this only works if the user clicks in an empty area of the grid (Without columns, rows). There is a solution to intercept the dblclick in a control within a grid without putting the same code on all of the controls of the grid ?>>>Carlos.>>Yes but a little bit complex. Place a shape control (that is done in grid init) in front of grid. Shape intercepts the clicks and passes to underlying grid as needed.>>Cetin>>Thanks again Cetin. I have not thinked a lot about this problem. This is a good solution.You could also code the DblClick event in to current controls of thecolumns.Sonali>>Sonali, of course i can do this, but i have 18 columns in grid and that's a lot. Thanks anyway.One way to overcome that would be to subclass the text control and usethat instead of the Default Text1.Sonali
Sonali,
So far so good. But what if grid is removing, adding, changing controls at runtime from different classes. So much controls to subclass. Instead a shape blocking the clicks could simply pass the click(s) to grid (topmost parent). Grid then could process the click, calculate the cell where the click was and call indiviual controls click (dblclick, rightclick etc) method as necessary. It's really easy to calculate the cell where the click has occured. This way you would deal with only one class (a kind of wrapper) and you needn't know what is the currentcontrols are.
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