Grid component
Jason Harthun <[email protected]> Sun, 18 May 2008 23:45:55 -0700 (PDT)
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
Hi. I need some help with the Grid component.
Here is the code that I'm working with:
self.components.grdDataGrid.EnableEditing(False)
def on_grdDataGrid_mouseDoubleClick(self, event):
self.components.grdDataGrid.EnableEditing(True)
event.skip()
def on_grdDataGrid_selectCell(self, event):
self.components.grdDataGrid.EnableEditing(False)
event.skip()
def on_grdDataGrid_keyDown(self, event):
self.components.grdDataGrid.EnableEditing(False)
event.skip()
def on_grdDataGrid_editorShown(self, event):
result = dialog.messageDialog(self, "Are you sure you wish to edit this cell?","Edit", wx.YES_NO)
if not result.accepted:
event.Veto()
self.components.grdDataGrid.EnableEditing(False)
return
event.skip()
def on_grdDataGrid_editorHidden(self, event):
result = dialog.messageDialog(self, "Are you sure you wish to save the changes?","Save", wx.YES_NO)
if not result.accepted:
event.Veto()
return
event.skip()
I would like to allow editing only if the user double clicks in the cell. After editing a cell and using enter or tab to exit the cell, the dialog associated with the editorHidden event pops up twice. I only want it to pop up once. Any help would be appreciated. Thanks.
Jason
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users