def DoModal(self): if self.dll: oldRes = win32ui.SetResource(self.dll) rc = self.sheet.DoModal() if self.dll: win32ui.SetResource(oldRes) return rc
def AddPage(self, pages): if self.dll: oldRes = win32ui.SetResource(self.dll) try: # try list style access pages[0] isSeq = 1 except (TypeError, KeyError): isSeq = 0 if isSeq: for page in pages: self.DoAddSinglePage(page) else: self.DoAddSinglePage(pages) if self.dll: win32ui.SetResource(oldRes)
def __init__(self, id, dllid=None, caption=0): """ id is the resource ID dllid may be None, a dll object, or a string with a dll name """ self.dll = dllFromDll(dllid) if self.dll: oldRes = win32ui.SetResource(self.dll) if type(id) == type([]): dlg = win32ui.CreatePropertyPageIndirect(id) else: dlg = win32ui.CreatePropertyPage(id, caption) if self.dll: win32ui.SetResource(oldRes) # dont call dialog init! window.Wnd.__init__(self, dlg) self.HookCommands()