def __init__(self, caption, dll=None, pageList=None ):# parent=None, style,etc): " Initialize a property sheet. pageList is a list of ID's " # must take a reference to the DLL until InitDialog. self.dll=dllFromDll(dll) self.sheet = win32ui.CreatePropertySheet(caption) window.Wnd.__init__(self, self.sheet) if not pageList is None: self.AddPage(pageList)
def demo(modal=0): TestDialog(modal) # property sheet/page demo ps = win32ui.CreatePropertySheet('Property Sheet/Page Demo') # Create a completely standard PropertyPage. page1 = win32ui.CreatePropertyPage(win32ui.IDD_PROPDEMO1) # Create our custom property page. page2 = TestPage(win32ui.IDD_PROPDEMO2) ps.AddPage(page1) ps.AddPage(page2) if modal: ps.DoModal() else: style = win32con.WS_SYSMENU | win32con.WS_POPUP | win32con.WS_CAPTION | win32con.DS_MODALFRAME | win32con.WS_VISIBLE styleex = win32con.WS_EX_DLGMODALFRAME | win32con.WS_EX_PALETTEWINDOW ps.CreateWindow(win32ui.GetMainFrame(), style, styleex)