Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
David,
That's exactly what I didn't want to hear:( Not only would I have to subclass a textBox, but every control that I use in the grid (combobox, spinner, checkbox, etc.)
Too bad there isn't a GridContainerShouldTrapMouseEventsBeforeContainedObjects property of the grid that could be set to .T. :)
Mike.
>Mike,
>
>As much as you hate it you will have to put code in each of the control's RightClick(). This can be done by using a subclassed textbox and using that subclass in each of the columns. You can make the code:
>
>this.parent.parent.RightClick()
>
>This way the control will just delegate the handling of the rightclick up to the grid.
>
>>I'm trying to make a shortcut menu for a VFP6 grid. I've created the menu using the menu designer and called it "mnuGrid". I added the following to the grid's RightClick event:
>>
>>DO mnuGrid.mpr
>>
>>The problem with this is that the RightClick event only gets fired when I right click on a part of the grid that does not contain columns (luckily for me, my grid layout had a part without columns). In other words, it appears to me that the controls in the columns get focus and no amount of right clicking will trigger the grid's RightClick event. I don't want to have to put the DO mnuGrid.mpr in every control of every column.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement