I'll try to summarize... There are sizers, maybe they matter?
Here is some pieces of the code. (I just kept the lines that
seems most relevant. This will surely not run.) Basically all
controls are in a sizer in a sizer [sic].
class EntityDetailFrame(wxFrame):
def __init__(self, parent, id, entity, owningObject = None):
p = wxPanel(self, -1, size=wxSize(-1, -1))
p.mainSizer = wxFlexGridSizer(4, 1, 10, 1)
dt = dragdrop.EntityDropTarget(self, self.klass)
self.SetDropTarget(dt)
p.attrSizer = wxFlexGridSizer(1, 10, 1, 2)
self.ID = wxTextCtrl(p, -1, size = wxSize(1,20))
myValidator = gridobj.OneCharValidator(self.klass.typeChoices,
self.type = wxTextCtrl(p, -1, size = wxSize(30,20), validator=myValidator)
self.system = wxChoice(p, ID_SYSTEM, (100, 20), choices = self.getSystems())
EVT_CHOICE(self.system, ID_SYSTEM, self.changeSystem)
self.partOf = DropZoneListBox(p, PART_OF_ID, wxPoint(80, 50),
p.listSizer.AddWindow(self.partOf, 0, wxALIGN_CENTER_VERTICAL, 5)
self.newBtn = wxButton(p, NEW_BUTTON_ID, '&New %s' % className)
p.buttonSizer.AddMany([
EVT_BUTTON(self, CLOSE_BUTTON_ID, self.OnClose)
EVT_MENU(self, ID_CLOSE, self.OnClose)
aTable = wxAcceleratorTable(
[(wxACCEL_NORMAL, WXK_ESCAPE, ID_CLOSE), # Doesn't work 
(wxACCEL_ALT, ord('X'), ID_CLOSE)] # Works!
)
self.SetAcceleratorTable(aTable)
# Finish sizer setup
p.SetSizer(p.mainSizer)
p.SetAutoLayout(true)
self.Refresh()
# Enter data into fields
self.populate()
···
At 16:25 2002-04-12 -0700, you wrote:
> I can catch things such as Alt-X with the accelerator table,
> but I guess the Esc is eaten up by something else. First I
What else is in the frame?
--
Magnus Lyckå, Thinkware AB
Älvans väg 99, SE-907 50 UMEÅ
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se