Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically building a grid.
Message
De
09/01/1999 19:39:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/12/1998 14:37:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00171617
Message ID:
00174425
Vues:
29
>>>>I've got a grid object in a container that only has 1 column in it.
>>>>During program execution, I dynamically add columns to the grid with the AddObject method. Everything works fine, but I would like to allow the user to right-click or double-click in the text boxes in the grid. I've placed wait windows in the right-click and double-click events of the grid, and they never fire.
>
>[... snip ...]
>
>I have a program that generates the grid at run-time and it works perfectly. I don't have the source code with me, but I remember there were a lot of steps involved: creating a custom class for the textboxes, adding a column, adding the custom textbox to the colum, setting CurrentControl, Sparse, ControlSource, caption of the column... But it worked great! I had done it in VFP5. The grid also deleted almost all of it's columns and restarted the recreation process when a certain field was changed and I never had any problems with it.

I think we'd be better off defining a custom column class, which would have our own custom header and our own custom textbox as members, and .AddObject that instead. So the header would have all the methods we need (like setting order to that column when clicked) and the textbox would, as well (have rightclick code).

The downside is that this class definition is to be done in code - column can't be subclassed in class designer.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform