Python wx 模块,Dialog() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用wx.Dialog()

项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_acceso_vcenter.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_7 = wx.StaticText(self, wx.ID_ANY, "Vcenter / esxi:")
        self.nombre_vcenter = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_9 = wx.StaticText(self, wx.ID_ANY, "Login:")
        self.login_vcenter = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_10 = wx.StaticText(self, wx.ID_ANY, "Password:")
        self.passwor_vcenter = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.label_8 = wx.StaticText(self, wx.ID_ANY, "Puerto:")
        self.puert_vcenter = wx.TextCtrl(self, wx.ID_ANY, "")
        self.button_Exit = wx.Button(self, wx.ID_CANCEL, "Exit")
        self.button_Connect = wx.Button(self, wx.ID_OK, "Conectar")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:code    作者:ActiveState    | 项目源码 | 文件源码
def buildDialog(filePath, resourceName, mayCancel, **defaults):
    """Return a configured wx.Dialog.
    Assumes that the OK and Cancel buttons are named ID_OK & ID_CANCEL.
    """
    res = loadXrc(filePath)
    insureWxApp()
    dlg = res.LoadDialog(None, resourceName)
    assert isinstance(dlg, wx.Dialog)
    dlg.Fit()
    fetchWidget = dlg.FindWindowByName
    bOk     = dlg.FindWindowByName('ID_OK')
    bCancel = dlg.FindWindowByName('ID_CANCEL')
    bOk.SetId(wx.ID_OK)
    bCancel.SetId(wx.ID_CANCEL)
    if not mayCancel:
        bCancel.Disable()
        bCancel.Hide()
    for name, value in defaults.items():
        dlg.FindWindowByName(name).SetValue(value)
    if not mayCancel:
        dlg.Bind(wx.EVT_CHAR_HOOK, escapeSuppressor)
    return dlg
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def __init__(self, parent, id, title, message, download_url, size=wx.DefaultSize, pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE, name='dialog'):
        wx.Dialog.__init__(self, parent, id, title, pos, size, style, name)

        label = wx.StaticText(self, label=message)
        button = wx.Button(self, id=wx.ID_OK, label="Close")
        button.SetDefault()

        line = wx.StaticLine(self, wx.ID_ANY, size=(20, -1), style=wx.LI_HORIZONTAL)
        download_ctrl = hl.HyperLinkCtrl(self, wx.ID_ANY, download_url, URL=download_url)

        sizer = wx.BoxSizer(wx.VERTICAL)
        button_sizer = wx.StdDialogButtonSizer()
        button_sizer.AddButton(button)
        button_sizer.Realize()

        sizer.Add(label, 0, wx.ALIGN_CENTER|wx.ALL, 5)
        sizer.Add(download_ctrl, 0, wx.ALL, 10)
        sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
        sizer.Add(button_sizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)

        self.SetSizer(sizer)
        sizer.Fit(self)
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def __init__(self, parent=None, first_run=False):
        wx.Dialog.__init__(self, parent, title="Settings", style=wx.DEFAULT_DIALOG_STYLE)
        self._first_run = first_run
        self._sizer = wx.BoxSizer(wx.VERTICAL)
        self._defaults = {}

        self._sizer.Add(URLEntryPanel(self, default_url=read_config_option("baseurl")), flag=wx.EXPAND | wx.ALL, border=5)

        authorization_sizer = wx.BoxSizer(wx.HORIZONTAL)
        authorization_sizer.Add(ClientDetailsPanel(self, default_client_id=read_config_option("client_id"), default_client_secret=read_config_option("client_secret")), flag=wx.EXPAND | wx.RIGHT, border=2, proportion=1)
        authorization_sizer.Add(UserDetailsPanel(self, default_user=read_config_option("username"), default_pass=read_config_option("password")), flag=wx.EXPAND | wx.LEFT, border=2, proportion=1)
        self._sizer.Add(authorization_sizer, flag=wx.EXPAND | wx.ALL, border=5)

        self._sizer.Add(PostProcessingTaskPanel(self, default_post_process=read_config_option("completion_cmd")), flag=wx.EXPAND | wx.ALL, border=5)
        self._sizer.Add(DefaultDirectoryPanel(self, default_directory=read_config_option("default_dir"), monitor_directory=read_config_option("monitor_default_dir", expected_type=bool)), flag=wx.EXPAND | wx.ALL, border=5)

        self._sizer.Add(self.CreateSeparatedButtonSizer(flags=wx.OK), flag=wx.EXPAND | wx.ALL, border=5)

        self.SetSizerAndFit(self._sizer)
        self.Layout()

        pub.subscribe(self._field_changed, SettingsDialog.field_changed_topic)
        self.Bind(wx.EVT_CLOSE, self._on_close)
        self.Bind(wx.EVT_BUTTON, self._on_close, id=wx.ID_OK)
        threading.Thread(target=connect_to_irida).start()
项目:mobileinsight-core    作者:mobile-insight    | 项目源码 | 文件源码
def __init__(self, parent, message, caption, choices=[]):
        wx.Dialog.__init__(self, parent, -1)
        self.SetTitle(caption)
        sizer = wx.BoxSizer(wx.VERTICAL)
        self.message = wx.StaticText(self, -1, message)
        self.clb = wx.CheckListBox(self, -1, choices=choices)
        self.chbox = wx.CheckBox(self, -1, 'Select all')
        self.btns = self.CreateSeparatedButtonSizer(wx.OK | wx.CANCEL)
        self.Bind(wx.EVT_CHECKBOX, self.EvtChBox, self.chbox)

        sizer.Add(self.message, 0, wx.ALL | wx.EXPAND, 5)
        sizer.Add(self.clb, 1, wx.ALL | wx.EXPAND, 5)
        sizer.Add(self.chbox, 0, wx.ALL | wx.EXPAND, 5)
        sizer.Add(self.btns, 0, wx.ALL | wx.EXPAND, 5)
        self.SetSizer(sizer)
        # self.Fit()
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialog_snapshot.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, "Nombre:")
        self.nombre_snap = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_2 = wx.StaticText(self, wx.ID_ANY, u"Descripci\u00f3n:")
        self.descripcion_snap = wx.TextCtrl(self, wx.ID_ANY, "")
        self.checkbox_memory = wx.CheckBox(self, wx.ID_ANY, "memory")
        self.checkbox_quiesce = wx.CheckBox(self, wx.ID_ANY, "quiesce")
        self.snap_ok = wx.Button(self, wx.ID_OK, "OK")
        self.snap_cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:PancakeViewer    作者:forensicmatt    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: LogicalVolumeDialog.__init__
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, wx.ID_ANY)
        self.panel_4 = wx.Panel(self, wx.ID_ANY)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, _("Select Logical Volume: "), style=wx.ALIGN_CENTER_HORIZONTAL)
        self.panel_7 = wx.Panel(self, wx.ID_ANY)
        self.combo_logical_volumes = wx.ComboBox(self, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.panel_8 = wx.Panel(self, wx.ID_ANY)
        self.panel_3 = wx.Panel(self, wx.ID_ANY)
        self.panel_5 = wx.Panel(self, wx.ID_ANY)
        self.button_select = wx.Button(self, wx.ID_OK, _("Select"))
        self.panel_9 = wx.Panel(self, wx.ID_ANY)
        self.button_cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
        self.panel_6 = wx.Panel(self, wx.ID_ANY)
        self.panel_2 = wx.Panel(self, wx.ID_ANY)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.button_select_click, id=wx.ID_OK)
        self.Bind(wx.EVT_BUTTON, self.button_cancel_click, id=wx.ID_CANCEL)
        # end wxGlade

        self.PopulateVolumes()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((400, 300))
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))

        ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
        ctrl.SetValue(info.License)

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, enable_required=True):
        wx.Dialog.__init__(self, parent, title=_('Project properties'),
                           style=wx.DEFAULT_DIALOG_STYLE)

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        self.ProjectProperties = ProjectPropertiesPanel(
            self,
            enable_required=enable_required)

        main_sizer.AddWindow(self.ProjectProperties, flag=wx.GROW)

        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK,
                  self.ButtonSizer.GetAffirmativeButton())
        main_sizer.AddSizer(self.ButtonSizer, border=20,
                            flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.SetSizer(main_sizer)
        self.ProjectProperties.Fit()
        self.Fit()
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def __init__( self, parent, title):
        wx.Dialog.__init__ (self, parent, -1, title, style = wx.DEFAULT_DIALOG_STYLE)
        self.lst = wx.BoxSizer( wx.VERTICAL )
        self.tus = []
        self.funcs = {'ctrl':self.add_ctrl, 'slide':self.add_slide, int:self.add_num,
                      float:self.add_num, 'lab':self.add_lab, bool:self.add_check,
                      str:self.add_txt, list:self.add_choice, 'img':self.add_img,
                      'tab':self.add_tab, 'color':self.add_color}

        self.on_ok, self.on_cancel = None, None
        self.ctrl_dic = {}
        boxBack = wx.BoxSizer()
        boxBack.Add(self.lst, 0, wx.ALL, 10)
        self.SetSizer( boxBack )
        self.Layout()
        self.handle = self.handle_
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Add_Student.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP
        wx.Dialog.__init__(self, *args, **kwds)
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
        self.button_1 = wx.Button(self, -1, "Add")

        self.Bind(wx.EVT_CLOSE,self.OnClose,self)

        self.__set_properties()
        self.__do_layout()

        self.DB=db_operations()
        self.success=False
        self.STUDENT_INFO=[]
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, parent):
        # begin wxGlade: CE_TE.__init__
        #kwds["style"] = wx.CLOSE_BOX|wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, parent,id=-1,title="CE and TE")
        self.parent=parent
        self.label_1 = wx.StaticText(self, -1, "Max_CE")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
        self.label_2 = wx.StaticText(self, -1, "Max_TE")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
        self.button_1 = wx.Button(self, -1, "OK")
        self.button_2 = wx.Button(self, -1, "Cancel")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT_ENTER, self.On_TE_Enter, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT, self.On_CE_Text, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT_ENTER, self.On_TE_Enter, self.text_ctrl_2)
        self.Bind(wx.EVT_TEXT, self.On_TE_Text, self.text_ctrl_2)
        self.Bind(wx.EVT_BUTTON, self.On_Ok, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.On_Cancel, self.button_2)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: disclaimer_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, ("Disclaimer"))
        self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_WORDWRAP)
        self.button_disagree = wx.Button(self, wx.ID_ANY, ("Disagree"))
        self.button_agree = wx.Button(self, wx.ID_ANY, ("I agree"))
        self.text='''


This SOFTWARE PRODUCT is a an open source free software distributed with GPL 3 License. Your are free to modify it subject to the
conditions laid in the license. It is also stated that the software is provided  "as is" and "with all faults." 
THE developer makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT. 
There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and and suits your needs. 
You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.'''
        self.__set_properties()
        self.__do_layout()
        self.agree=False


        self.Bind(wx.EVT_BUTTON, self.on_disagree, self.button_disagree)
        self.Bind(wx.EVT_BUTTON, self.on_agree, self.button_agree)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: help_window.__init__
        kwds["style"] = wx.MAXIMIZE | wx.CLOSE_BOX | wx.THICK_FRAME|wx.CAPTION
        wx.Dialog.__init__(self, *args, **kwds)
        self.window_1 = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER)
        self.window_1_pane_left = wx.Panel(self.window_1, wx.ID_ANY)
        self.html_left = html.HtmlWindow(self.window_1_pane_left, wx.ID_ANY, size=(1, 1))
        self.window_1_pane_right = wx.Panel(self.window_1, wx.ID_ANY)
        self.html_right = html.HtmlWindow(self.window_1_pane_right, wx.ID_ANY, size=(1, 1))

        #self.Bind(wx.EVT_COself.on_hyperlink,self.html_left)
        self.Bind(wx.html.EVT_HTML_LINK_CLICKED,self.on_hyperlink,self.html_left)
        #self.Bind(wx.EVT_SIZE,self.on_resize)

        self.__set_properties()
        self.__do_layout()
        #self.on_resize(None)
        self.load_htmlpage()
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: add_academic_year.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_3 = wx.StaticText(self, wx.ID_ANY, ("Academic Year"))
        self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_4 = wx.StaticText(self, wx.ID_ANY, ("-"))
        self.text_ctrl_2 = wx.TextCtrl(self, wx.ID_ANY, "")
        self.button_close = wx.Button(self, wx.ID_ANY, ("Close"))
        self.button_add = wx.Button(self, wx.ID_ANY, ("Add"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_enter, self.text_ctrl_1)

        self.Bind(wx.EVT_BUTTON, self.on_close, self.button_close)
        self.Bind(wx.EVT_BUTTON, self.on_add, self.button_add)

        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.handle_keypress)

        self.NEW_YEAR=''
        # end wxGlade
项目:MechWarfareScoring    作者:artanz    | 项目源码 | 文件源码
def __init__( self, parent, id, titlemsg ):
        wx.Dialog.__init__( self, parent, id, title=titlemsg )

        MechList = []
        for m in parent.ScoreServer.MechList.List:
            MechList.append( str(m.ID) + ": " + str(m.Name) )

        self.MechText = wx.StaticText( self, -1, "Mech Selection:" )
        self.MechChoice = wx.ListBox( self, -1, style=wx.LB_EXTENDED, choices=MechList )            
        self.CancelButton = wx.Button( self, wx.ID_CANCEL, "Cancel" )
        self.OKButton = wx.Button( self, wx.ID_OK, "OK" )

        TopSizer = wx.BoxSizer( wx.VERTICAL )
        BtnSizer = wx.BoxSizer( wx.HORIZONTAL )

        BtnSizer.Add( self.CancelButton, 0, wx.ALL, 5 )
        BtnSizer.Add( self.OKButton, 0, wx.ALL, 5 )

        TopSizer.Add( self.MechText, 0, wx.ALL, 5 )
        TopSizer.Add( self.MechChoice, 0, wx.ALL, 5 )
        TopSizer.Add( BtnSizer, 0, wx.ALL|wx.CENTER, 5 )

        self.SetSizer( TopSizer )
        TopSizer.Fit( self )
项目:bp5000    作者:isaiahr    | 项目源码 | 文件源码
def place(self, e):
        if not hasattr(self, "brackets"):
            errortext = "Make bracket before doing that"
            w = wx.MessageDialog(self.parent, errortext,
                                 "Error", wx.ICON_ERROR)
            w.ShowModal()
            w.Destroy()
            return
        placel = bracketfuncs.placing(self.brackets)
        d = wx.Dialog(None)
        d.SetTitle("Results")
        a = wx.TextCtrl(d, style=wx.TE_MULTILINE)
        a.SetEditable(False)
        ptxt = ""
        for p in placel:
            if not p.isbye():
                ptxt += str(placel[p]) + ". " + p.tag + "\n"
        a.SetValue(ptxt)
        d.SetSize((250, 320))
        d.Show(True)
项目:Jackal_Velodyne_Duke    作者:MengGuo    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        self.settings = kwds['settings']
        del kwds['settings']
        # begin wxGlade: TerminalSettingsDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.checkbox_echo = wx.CheckBox(self, -1, "Local Echo")
        self.checkbox_unprintable = wx.CheckBox(self, -1, "Show unprintable characters")
        self.radio_box_newline = wx.RadioBox(self, -1, "Newline Handling", choices=["CR only", "LF only", "CR+LF"], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
        self.sizer_4_staticbox = wx.StaticBox(self, -1, "Input/Output")
        self.button_ok = wx.Button(self, wx.ID_OK, "")
        self.button_cancel = wx.Button(self, wx.ID_CANCEL, "")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
        self.__attach_events()
        self.checkbox_echo.SetValue(self.settings.echo)
        self.checkbox_unprintable.SetValue(self.settings.unprintable)
        self.radio_box_newline.SetSelection(self.settings.newline)
项目:btc-fpga-miner    作者:marsohod4you    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        self.settings = kwds['settings']
        del kwds['settings']
        # begin wxGlade: TerminalSettingsDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.checkbox_echo = wx.CheckBox(self, -1, "Local Echo")
        self.checkbox_unprintable = wx.CheckBox(self, -1, "Show unprintable characters")
        self.radio_box_newline = wx.RadioBox(self, -1, "Newline Handling", choices=["CR only", "LF only", "CR+LF"], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
        self.button_ok = wx.Button(self, -1, "OK")
        self.button_cancel = wx.Button(self, -1, "Cancel")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
        self.__attach_events()
        self.checkbox_echo.SetValue(self.settings.echo)
        self.checkbox_unprintable.SetValue(self.settings.unprintable)
        self.radio_box_newline.SetSelection(self.settings.newline)
项目:Boms-Away    作者:Jeff-Ciesielski    | 项目源码 | 文件源码
def __init__(self, parent, id, title):
        wx.Dialog.__init__(self, parent, id, title)
        self.selection_idx = None
        self.selection_text = None

        vbox = wx.BoxSizer(wx.VERTICAL)
        stline = wx.StaticText(
            self,
            11,
            'Duplicate Component values found!'
            '\n\nPlease select which format to follow:')
        vbox.Add(stline, 0, wx.ALIGN_CENTER|wx.TOP)
        self.comp_list = wx.ListBox(self, 331, style=wx.LB_SINGLE)

        vbox.Add(self.comp_list, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND)
        self.SetSizer(vbox)
        self.comp_list.Bind(wx.EVT_LISTBOX_DCLICK, self.on_selection, id=wx.ID_ANY)
项目:wxWize    作者:AndersMunch    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, title=u"Logon", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        vsizer = wx.BoxSizer(orient=wx.VERTICAL)
        gb = wx.GridBagSizer()
        gb.Add(wx.StaticText(self, -1, u"Username"), flag=wx.ALL|wx.EXPAND, border=10, pos=(0,0))
        self._name = wx.TextCtrl(self, -1)
        gb.Add(self._name, flag=wx.ALL|wx.EXPAND, border=10, pos=(0,1))
        gb.Add(wx.StaticText(self, -1, u"Password"), flag=wx.ALL|wx.EXPAND, pos=(1,0), border=10)
        self._pass = wx.TextCtrl(self, -1, style=wx.TE_PASSWORD)
        gb.Add(self._pass, border=10, flag=wx.EXPAND|wx.ALL, pos=(1,1))
        gb.AddGrowableCol(1)
        butsz = wx.StdDialogButtonSizer()
        okbut = wx.Button(self, wx.ID_OK, u"OK")
        butsz.AddButton(okbut)
        cbut = wx.Button(self, wx.ID_CANCEL, u"Cancel")
        butsz.AddButton(cbut)
        insp = wx.Button(self, wx.ID_HELP, u"Help")
        butsz.AddButton(insp)
        insp.Bind(wx.EVT_BUTTON, InspectionTool().Show)
        butsz.Realize()
        okbut.SetDefault()
        vsizer.Add(gb, 0, wx.EXPAND)
        vsizer.Add(butsz, 0, wx.EXPAND)
        self.SetSizer(vsizer)
        self.Fit()
项目:wxWize    作者:AndersMunch    | 项目源码 | 文件源码
def __init__(self, parent):
        with iz.Dialog(init=self, title=u"Logon", orient=wx.VERTICAL, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER):
            with iz.GridBagSizer(orient=wx.HORIZONTAL, proportion=1) as gb:
                # Defaults for StaticText and TextCtrl are normally border=0,proportion=0,flag=0. Change them temporarily
                # to avoid repeating the same options for each and every control:
                with iz.StaticText.Default(border=10), iz.TextCtrl.Default(border=10, proportion=1, flag=wx.EXPAND):
                    # Now the sizer parameters can be omitted in the control definitions, since the defaults are
                    # now appropriate.
                    iz.StaticText(u"Username")
                    self._name = iz.TextCtrl().wx
                    iz.StaticText(u"Password", x=0)
                    self._pass = iz.TextCtrl(style=wx.TE_PASSWORD).wx
            gb.AddGrowableCol(1)
            with iz.StdDialogButtonSizer():
                okbut = iz.Button(u"OK", id=wx.ID_OK).wx
                iz.Button(u"Cancel", id=wx.ID_CANCEL)
                insp = iz.Button(u"Help", id=wx.ID_HELP,border=10, EVT_BUTTON=InspectionTool().Show).wx
        okbut.SetDefault()
        self.Fit()
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, controller_uid):
        TopLevel.__init__(self, controller_uid)
        UIM = UIManager()
        controller = UIM.get(self._controller_uid)
        wx.Dialog.__init__(self, None, wx.ID_ANY, controller.model.title,
            pos=controller.model.pos, size=controller.model.size, 
            style=controller.model.style              
        ) 
        self._objects = {}
        if controller.model.icon:   
            self.icon = wx.Icon(controller.model.icon, wx.BITMAP_TYPE_ICO)        
            self.SetIcon(self.icon)     
        if controller.model.maximized:
            self.Maximize()   
        self.Bind(wx.EVT_MAXIMIZE, self.on_maximize)       
        self.Bind(wx.EVT_SIZE, self.on_size)    
        self.Bind(wx.EVT_MOVE, self.on_move)  
        dialog_box = wx.BoxSizer(wx.VERTICAL) 
        self.SetSizer(dialog_box) 
        self.mainpanel = self.AddCreateContainer('BoxSizer', self, proportion=1, 
                            flag=wx.TOP|wx.LEFT|wx.RIGHT|wx.EXPAND, border=10
        )
        button_sizer = self.CreateButtonSizer(controller.model.flags)
        dialog_box.Add(button_sizer, flag=wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, border=10)    
        dialog_box.Layout()
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        if 'on_ok_callback' in kwargs:
            self.on_ok_callback = kwargs.pop('on_ok_callback')
        else:
            self.on_ok_callback = None

        if 'on_cancel_callback' in kwargs:
            self.on_cancel_callback = kwargs.pop('on_cancel_callback')
        else:
            self.on_cancel_callback = None

        super(Dialog, self).__init__(*args, **kwargs)

        self.header_panel = Panel(self)

        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        self.Bind(wx.EVT_BUTTON, self.on_button)

        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(self.header_panel, proportion=1, flag=wx.ALL | wx.EXPAND)
        vbox.Add(button_sizer, flag=wx.ALIGN_RIGHT)
        self.SetSizer(vbox)

        self.SetSize((800, 600))
        self.SetTitle(u"Editor de Cabeçalho LAS")
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        if 'on_ok_callback' in kwargs:
            self.on_ok_callback = kwargs.pop('on_ok_callback')
        else:
            self.on_ok_callback = None

        if 'on_cancel_callback' in kwargs:
            self.on_cancel_callback = kwargs.pop('on_cancel_callback')
        else:
            self.on_cancel_callback = None

        super(Dialog, self).__init__(*args, **kwargs)

        self.header_panel = Panel(self)

        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        self.Bind(wx.EVT_BUTTON, self.on_button)

        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(self.header_panel, proportion=1, flag=wx.ALL | wx.EXPAND)
        vbox.Add(button_sizer, flag=wx.ALIGN_RIGHT)
        self.SetSizer(vbox)

        self.SetSize((800, 600))
        self.SetTitle(u"Editor de Cabeçalho ODT")
项目:code    作者:ActiveState    | 项目源码 | 文件源码
def useTemporaryDialog(filePath, resourceName, mayCancel,
                       *itemNames, **defaults):
    """Create a dialog, run it, capture the results, destroy the dialog,
    and return the results.
    Return None if the user cancels.
    """
    dlg = buildDialog(filePath, resourceName, mayCancel, **defaults)
    try:
        result = runDialog(dlg, mayCancel, *itemNames)
    finally:
        dlg.Destroy()
    return result


# --- Sample Dialog ---
项目:nodemcu-pyflasher    作者:marcelstoer    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, wx.ID_ANY, "About NodeMCU PyFlasher")
        html = HtmlWindow(self, wx.ID_ANY, size=(420, -1))
        if "gtk2" in wx.PlatformInfo or "gtk3" in wx.PlatformInfo:
            html.SetStandardFonts()
        txt = self.text.format(self._get_bundle_dir(), __version__)
        html.SetPage(txt)
        ir = html.GetInternalRepresentation()
        html.SetSize((ir.GetWidth() + 25, ir.GetHeight() + 25))
        self.SetClientSize(html.GetSize())
        self.CentreOnParent(wx.BOTH)
项目:SameKeyProxy    作者:xzhou    | 项目源码 | 文件源码
def __init__(self, parent=None, message='Message:',
                 caption='Message', style=wx.OK|wx.CANCEL,pos=wx.DefaultPosition):
        wx.Dialog.__init__(self, parent, -1, caption, size=wx.DefaultSize,
                          style=wx.CAPTION, pos=pos)
        self._build(message, style)
        self.Fit()
项目:Taigabot    作者:FrozenPigs    | 项目源码 | 文件源码
def __init__(self, parent=None,id=-1,title="Checking Spelling..."):
        wx.Dialog.__init__(self, parent, id, title, size=wxSpellCheckerDialog.sz, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        self._numContext = 40
        self._checker = None
        self._buttonsEnabled = True
        self.error_text = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_RICH)
        self.replace_text = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER)
        self.replace_list = wx.ListBox(self, -1, style=wx.LB_SINGLE)
        self.InitLayout()
        wx.EVT_LISTBOX(self,self.replace_list.GetId(),self.OnReplSelect)
        wx.EVT_LISTBOX_DCLICK(self,self.replace_list.GetId(),self.OnReplace)
项目:SIMreader    作者:stoic1979    | 项目源码 | 文件源码
def __init__(self, parent, id=-1, title="Dialog", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE):
        wx.Dialog.__init__(self, parent, id, title)
        self.SetBackgroundColour(backgroundColour)
项目:FestEngine    作者:Himura2la    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title="FestEngine Log", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        main_sizer = wx.BoxSizer(wx.VERTICAL)

        self.text_ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
        main_sizer.Add(self.text_ctrl, 1, wx.EXPAND)

        self.pending_messages = list()
        self.timer = wx.Timer()
        self.timer.Bind(wx.EVT_TIMER, self.append_pending_messages)
        self.timer.Start(500)
        self.SetSizer(main_sizer)
项目:mobileinsight-core    作者:mobile-insight    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, style=wx.NO_BORDER)
        mainSizer = wx.BoxSizer(wx.VERTICAL)

        gif = wx.animate.GIFAnimationCtrl(
            self, -1, "icons/progress.gif", pos=(0, 0), size=(-1, -1))
        gif.GetPlayer().UseBackgroundColour(True)
        gif.Play()

        mainSizer.Add(gif, wx.EXPAND | wx.ALL)
        self.SetSizer(mainSizer)
        self.Fit()
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_texto.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.salida_texto = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.bnt_salida_ok = wx.Button(self, wx.ID_OK, "OK", style=wx.BU_BOTTOM)
        self.sizer_1_staticbox = wx.StaticBox(self, wx.ID_ANY, "Information")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_user_pass.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_3 = wx.StaticText(self, wx.ID_ANY, "Usuario:")
        self.usuario = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_4 = wx.StaticText(self, wx.ID_ANY, "Password:")
        self.password = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.button_OK = wx.Button(self, wx.ID_OK, "OK")
        self.button_cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_ejecutando.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.titulo = wx.StaticText(self, wx.ID_ANY, "Accediendo al sistema: ", style=wx.ALIGN_CENTER)
        self.elementos = wx.StaticText(self, wx.ID_ANY, "000000", style=wx.ALIGN_CENTER)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:PancakeViewer    作者:forensicmatt    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: ExtractionDialog.__init__
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_21 = wx.Panel(self, wx.ID_ANY)
        self.panel_22 = wx.Panel(self, wx.ID_ANY)
        self.label_2 = wx.StaticText(self, wx.ID_ANY, _("Extraction Location: "))
        self.panel_23 = wx.Panel(self, wx.ID_ANY)
        self.text_ctrl_outpath = wx.TextCtrl(self, wx.ID_ANY, "")
        self.panel_24 = wx.Panel(self, wx.ID_ANY)
        self.button_browse_path = wx.Button(self, wx.ID_ANY, _("Browse"))
        self.panel_25 = wx.Panel(self, wx.ID_ANY)
        self.panel_10 = wx.Panel(self, wx.ID_ANY)
        self.panel_13 = wx.Panel(self, wx.ID_ANY)
        self.radio_box_selection = wx.RadioBox(self, wx.ID_ANY, _("Selection"), choices=[_("Extract All Highlighted")], majorDimension=1, style=wx.RA_SPECIFY_COLS)
        self.panel_14 = wx.Panel(self, wx.ID_ANY)
        self.panel_18 = wx.Panel(self, wx.ID_ANY)
        self.panel_19 = wx.Panel(self, wx.ID_ANY)
        self.checklistbox_options = wx.CheckListBox(self, wx.ID_ANY)
        self.panel_20 = wx.Panel(self, wx.ID_ANY)
        self.panel_12 = wx.Panel(self, wx.ID_ANY)
        self.panel_15 = wx.Panel(self, wx.ID_ANY)
        self.button_extract = wx.Button(self, wx.ID_ANY, _("Extract"))
        self.panel_16 = wx.Panel(self, wx.ID_ANY)
        self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel"))
        self.panel_17 = wx.Panel(self, wx.ID_ANY)
        self.panel_11 = wx.Panel(self, wx.ID_ANY)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.button_browse_path_click, self.button_browse_path)
        self.Bind(wx.EVT_RADIOBOX, self.radio_box_selection_clicked, self.radio_box_selection)
        self.Bind(wx.EVT_BUTTON, self.button_extract_click, self.button_extract)
        self.Bind(wx.EVT_BUTTON, self.button_cancel_click, self.button_cancel)
        # end wxGlade

        self._InitCheckboxes()
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent, subpanel):
        wx.Dialog.__init__(self, parent, title="Calculate Q-vector", size=(300, 180),style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        self.subpanel = subpanel
        vbox = wx.BoxSizer(wx.VERTICAL)
        self.ttheta = NumberObject(self,"2 theta:",self.subpanel.ttheta,80)
        self.ttheta.label.SetToolTipNew("2 theta angle (radians). "+os.linesep+"Note: Diffraction pattern is assumed "+os.linesep+"to be co-ordinate corrected.")
        self.phi = NumberObject(self,"phi:",self.subpanel.phi,80)
        self.phi.label.SetToolTipNew("phi angle (radians). "+os.linesep+"Note: Diffraction pattern is assumed "+os.linesep+"to be co-ordinate corrected.")
        self.waveln = NumberObject(self,"lambda:",self.subpanel.waveln,80)
        self.waveln.label.SetToolTipNew("wavelength (nanometers),")
        vbox.Add(self.ttheta ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.phi ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.waveln ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.rb = RadioBoxNew(self, label="Coordinate system", choices=['Global','Detector'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.rb.SetToolTipNew("Select co-ordinate system for Q-vector. "+os.linesep+"If the Diffraction data is co-ordinate corrected,"+os.linesep+"the global system is appropriate."+os.linesep+"If not, the detector system should be used."+os.linesep+"(i.e. normal to the reflected wave.)")
        vbox.Add(self.rb ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1,10))
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        self.ok = wx.Button(self, label='Ok', size=(70, 30))
        self.cancel = wx.Button(self, label='Cancel', size=(70, 30))
        hbox.Add(self.ok, 1,flag=wx.EXPAND)
        hbox.Add(self.cancel, 1, flag=wx.EXPAND)
        vbox.Add(hbox ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetSizer(vbox)
        self.ok.Bind(wx.EVT_BUTTON, self.OnOk)
        self.cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
        self.Fit()
        self.Layout()
        self.Show()
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title="Measure Scene", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        self.SetSizeHints(640,480,-1,-1)
        self.Bind(wx.EVT_CLOSE, self.OnExit)
        self.panelvisual = self.GetParent()
        self.nb = wx.Notebook(self)
        self.nb.AddPage(MeasureLine(self.nb), "Line Scan")
        self.nb.AddPage(MeasureAngle(self.nb), "Angle")
        self.nb.AddPage(OrientXYZ(self.nb), "Orientation")
        sizer = wx.BoxSizer()
        sizer.Add(self.nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
        self.Fit()
        self.Layout()
        self.Show()
项目:pinder    作者:dhharris    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, wx.ID_ANY, 'Facebook Login', size= (650,220))
        self.panel = wx.Panel(self,wx.ID_ANY)

        self.lbluser = wx.StaticText(self.panel, label='Username', pos=(20,20))
        self.user = wx.TextCtrl(self.panel, value="", pos=(110,20), size=(500,-1))
        self.lblpassword = wx.StaticText(self.panel, label='Password', pos=(20,60))
        self.password = wx.TextCtrl(self.panel, value="", pos=(110,60), size=(500,-1), style=wx.TE_PASSWORD)

        self.submitButton =wx.Button(self.panel, label='Submit', pos=(110,160))
        self.closeButton = wx.Button(self.panel, label='Cancel', pos=(210,160))
        self.submitButton.Bind(wx.EVT_BUTTON, self.SaveConnString)
        self.closeButton.Bind(wx.EVT_BUTTON, self.OnQuit)
        self.Bind(wx.EVT_CLOSE, self.OnQuit)
项目:AppAutoViewer    作者:RealLau    | 项目源码 | 文件源码
def __init__(self, message, title):
        wx.Dialog.__init__(self, None, -1, title,size=(300, 120))
        self.CenterOnScreen(wx.BOTH)
        text = wx.StaticText(self, -1, message)
        ok = wx.Button(self, wx.ID_OK, "???????????????")
        ok.SetDefault()
        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(text, 1, wx.ALIGN_CENTER|wx.TOP, 10)
        vbox.Add(ok, 1, wx.ALIGN_CENTER|wx.BOTTOM, 10)
        self.SetSizer(vbox)
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, helpFile, title='Temp'):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title)

        self.help = helpFile
        self.InitUI()
        self.SetSize((700, 600))
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, parent=None, title='Temp'):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title)
        self.parent = parent
        self.shouldAbort = False
        self.running = False
        self.wpkg_start_time = None
        self.shutdown_scheduled = False
        self.reboot_scheduled = False
        self.log = ""
        self.InitUI()
        size_y = self.GetEffectiveMinSize()[1]
        self.SetSize((410, size_y))
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, title='Temp', log="Temp"):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        self.log = "\n".join(log)
        self.InitUI()
        self.SetSize((640, 480))
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, title='Temp', log="Temp"):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        self.log = "\n".join(log)
        self.InitUI()
        self.SetSize((640, 480))
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, name, library, default=None):
        wx.Dialog.__init__(self,
                           name='BrowseValueDialog', parent=parent,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
                           title=_('Browse %s values library') % name)

        self.staticText1 = wx.StaticText(
              label=_('Choose a value for %s:') % name, name='staticText1', parent=self,
              pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)

        self.ValuesLibrary = wx.TreeCtrl(
              name='ValuesLibrary', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(400, 200), style=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.SUNKEN_BORDER | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT)

        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)

        self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId())

        self.flexGridSizer1 = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)

        self.flexGridSizer1.AddWindow(self.staticText1,   0, border=20, flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddWindow(self.ValuesLibrary, 0, border=20, flag=wx.GROW | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddSizer(self.ButtonSizer,    0, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.flexGridSizer1.AddGrowableCol(0)
        self.flexGridSizer1.AddGrowableRow(1)

        self.SetSizer(self.flexGridSizer1)
        self.Fit()

        root = self.ValuesLibrary.AddRoot("")
        self.GenerateValuesLibraryBranch(root, library, default)
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((300, 200))
        notebook = wx.Notebook(self)
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))
        close.SetDefault()

        developer = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)
        translators = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)

        developer.SetValue(u'\n'.join(info.Developers))
        translators.SetValue(u'\n'.join(info.Translators))

        notebook.AddPage(developer, text=_("Written by"))
        notebook.AddPage(translators, text=_("Translated by"))

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(notebook, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title=_('Create a new action'))

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=15)
        infos_sizer.AddGrowableCol(1)
        main_sizer.AddSizer(infos_sizer, border=20,
                            flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)

        actionname_label = wx.StaticText(self, label=_('Action Name:'))
        infos_sizer.AddWindow(actionname_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.ActionName = wx.TextCtrl(self, size=wx.Size(180, -1))
        infos_sizer.AddWindow(self.ActionName, flag=wx.GROW)

        language_label = wx.StaticText(self, label=_('Language:'))
        infos_sizer.AddWindow(language_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
        infos_sizer.AddWindow(self.Language, flag=wx.GROW)

        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK,
                  button_sizer.GetAffirmativeButton())
        main_sizer.AddSizer(button_sizer, border=20,
                            flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.SetSizer(main_sizer)

        for option in GetActionLanguages():
            self.Language.Append(_(option))

        self.Fit()
        self.PouNames = []
        self.PouElementNames = []
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title=_('Create a new transition'))

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=10)
        infos_sizer.AddGrowableCol(1)
        main_sizer.AddSizer(infos_sizer, border=20,
                            flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)

        transitionname_label = wx.StaticText(self, label=_('Transition Name:'))
        infos_sizer.AddWindow(transitionname_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.TransitionName = wx.TextCtrl(self, size=wx.Size(180, -1))
        infos_sizer.AddWindow(self.TransitionName, flag=wx.GROW)

        language_label = wx.StaticText(self, label=_('Language:'))
        infos_sizer.AddWindow(language_label, border=4,
                              flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)

        self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
        infos_sizer.AddWindow(self.Language, flag=wx.GROW)

        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
        main_sizer.AddSizer(button_sizer, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM)

        self.SetSizer(main_sizer)

        for language in GetTransitionLanguages():
            self.Language.Append(_(language))

        self.Fit()
        self.PouNames = []
        self.PouElementNames = []
项目:ChiantiPy    作者:chianti-atomic    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: ui_choice2Dialog.__init__
        kwds["style"] = wx.DIALOG_NO_PARENT
        wx.Dialog.__init__(self, *args, **kwds)
        self.numListBox = wx.ListBox(self, -1, choices=[], style=wx.LB_MULTIPLE)
        self.button_ok = wx.Button(self, wx.ID_OK, "")
        self.denListBox = wx.ListBox(self, -1, choices=[], style=wx.LB_MULTIPLE)
        self.button_cancel = wx.Button(self, wx.ID_CANCEL, "")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Institution.__init__
        kwds["style"] = wx.CAPTION | wx.MAXIMIZE|wx.CLOSE_BOX | wx.MINIMIZE_BOX # | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Institution Settings")
        self.label_2 = wx.StaticText(self, -1, "School Name")
        self.text_ctrl_5 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_4 = wx.StaticText(self, -1, "School Code")
        self.text_ctrl_6 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_6 = wx.StaticText(self, -1, "E-Mail")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.label_7 = wx.StaticText(self, -1, "Phone")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.label_8 = wx.StaticText(self, -1, "Place")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "Save")

        self.DB=db_operations()

        self.__set_properties()
        self.__do_layout()
        self.OnLoad()

        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2)
        self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3)

        self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2)


        # end wxGlade