Esempio n. 1
0
def test(modal=1):
    #	dlg=dialog.Dialog(1010)
    #	dlg.CreateWindow()
    #	dlg.EndDialog(0)
    #	del dlg
    #	return
    # property sheet/page demo
    ps = TestSheet('Property Sheet/Page Demo')
    page1 = win32ui.CreatePropertyPage(win32ui.IDD_PROPDEMO1)
    page2 = win32ui.CreatePropertyPage(win32ui.IDD_PROPDEMO2)
    ps.AddPage(page1)
    ps.AddPage(page2)
    del page1
    del page2
    if modal:
        ps.DoModal()
    else:
        ps.CreateWindow(win32ui.GetMainFrame())
    return ps
Esempio n. 2
0
    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()
Esempio n. 3
0
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)
Esempio n. 4
0
 def DoAddSinglePage(self, page):
     "Page may be page, or int ID. Assumes DLL setup "
     if type(page) == type(0):
         self.sheet.AddPage(win32ui.CreatePropertyPage(page))
     else:
         self.sheet.AddPage(page)