當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.TE_PASSWORD屬性代碼示例

本文整理匯總了Python中wx.TE_PASSWORD屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.TE_PASSWORD屬性的具體用法?Python wx.TE_PASSWORD怎麽用?Python wx.TE_PASSWORD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.TE_PASSWORD屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def __init__(self, parent, title):
        style = wx.DEFAULT_DIALOG_STYLE
        vbox = wx.BoxSizer(wx.VERTICAL)
        wx.Dialog.__init__(self, parent, -1, title, style=style)
        self.user_lbl = wx.StaticText(self, -1, STR_USERNAME)
        self.txt_username = wx.TextCtrl(self, -1, "")
        self.pass_lbl = wx.StaticText(self, -1, STR_PASSWORD)
        self.txt_pass = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        grid_sizer_1 = wx.FlexGridSizer(2, 2, 5, 5)
        grid_sizer_1.Add(self.user_lbl, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.txt_username, 0, wx.EXPAND, 0)
        grid_sizer_1.Add(self.pass_lbl, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.txt_pass, 0, wx.EXPAND, 0)
        buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        vbox.Add(grid_sizer_1, wx.EXPAND | wx.ALL, 10)
        vbox.Add(buttons)
        self.SetSizerAndFit(vbox) 
開發者ID:theRealTacoTime,項目名稱:poclbm,代碼行數:19,代碼來源:guiminer.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def __init__(
        self,
        parent,
        id=-1,
        value="",
        pos=wx.DefaultPosition,
        size=wx.DefaultSize,
    ):
        if isinstance(value, eg.Password):
            self.password = value
        else:
            self.password = eg.Password(content=value)
        wx.TextCtrl.__init__(
            self,
            parent,
            id,
            self.password.Get(),
            pos,
            size,
            style=wx.TE_PASSWORD,
        ) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:23,代碼來源:PasswordCtrl.py

示例3: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def __init__(self, parent):
        '''構造函數'''

        wx.Frame.__init__(self, parent, -1, APP_TITLE)
        self.SetBackgroundColour(wx.Colour(224, 224, 224))
        self.SetSize((600, 400))
        self.Center()

        wx.StaticText(self, -1, u'用戶名', pos=(10, 55), size=(42, -1))
        wx.StaticText(self, -1, u'密碼', pos=(10, 85), size=(40, -1))

        self.tc1 = wx.TextCtrl(self, -1, '', pos=(50, 50), size=(150, -1), name='TC01', style=wx.TE_PASSWORD)
        self.tc2 = wx.TextCtrl(self, -1, '', pos=(50, 80), size=(150, -1), name='TC02', style=wx.TE_PASSWORD)

        btn_login = wx.Button(self, -1, u'登錄', pos=(200, 50), size=(100, 25))
        btn_login.Bind(wx.EVT_LEFT_DOWN, self.OnLoginWeibo)

        wx.StaticText(self, -1, u'內容', pos=(10, 125), size=(40, -1))
        self.tcContent = wx.TextCtrl(self, -1, '', pos=(50, 120), size=(200, -1))

        wx.StaticText(self, -1, u'圖片', pos=(10, 155), size=(40, -1))
        self.tcImage = wx.TextCtrl(self, -1, '', pos=(50, 150), size=(200, -1))

        btn_content = wx.Button(self, -1, u'發送文本微博', pos=(50, 180), size=(100, 25))
        btn_content.Bind(wx.EVT_LEFT_DOWN, self.OnPostContent)

        btn_image = wx.Button(self, -1, u'發送圖文微博', pos=(150, 180), size=(100, 25))
        btn_image.Bind(wx.EVT_LEFT_DOWN, self.OnPostImage)

        btn_blog = wx.Button(self, -1, u'獲取微博', pos=(250, 180), size=(100, 25))
        btn_blog.Bind(wx.EVT_LEFT_DOWN, self.OnGetBlogs)

        wx.StaticText(self, -1, u'刪除ID', pos=(10, 235), size=(40, -1))
        self.tcBlogID = wx.TextCtrl(self, -1, '', pos=(50, 230), size=(200, -1))

        btn_del = wx.Button(self, -1, u'刪除微博', pos=(50, 260), size=(100, 25))
        btn_del.Bind(wx.EVT_LEFT_DOWN, self.OnDelBlog) 
開發者ID:XJouYi,項目名稱:SinaWeibo,代碼行數:39,代碼來源:testWx.py

示例4: PasswordInput

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def PasswordInput(_, parent, *args, **kwargs):
    style = {'style': wx.TE_PASSWORD}
    return TextInput(parent, *args, **merge(kwargs, style)) 
開發者ID:chriskiehl,項目名稱:Gooey,代碼行數:5,代碼來源:text_input.py

示例5: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def __init__(self, *args, **kwargs):
        super(GeneralTab, self).__init__(*args, **kwargs)

        self.language_label = self.crt_statictext(_("Language"))
        self.language_combobox = self.crt_bitmap_combobox(list(self.LOCALE_NAMES.items()), event_handler=self._on_language)

        self.filename_format_label = self.crt_statictext(_("Filename format"))
        self.filename_format_combobox = self.crt_combobox(list(OUTPUT_FORMATS.values()), event_handler=self._on_filename)
        self.filename_custom_format = self.crt_textctrl()
        self.filename_custom_format_button = self.crt_button("...", self._on_format)

        self.filename_opts_label = self.crt_statictext(_("Filename options"))
        self.filename_ascii_checkbox = self.crt_checkbox(_("Restrict filenames to ASCII"))

        self.more_opts_label = self.crt_statictext(_("More options"))
        self.confirm_exit_checkbox = self.crt_checkbox(_("Confirm on exit"))
        self.confirm_deletion_checkbox = self.crt_checkbox(_("Confirm item deletion"))
        self.show_completion_popup_checkbox = self.crt_checkbox(_("Inform me on download completion"))

        self.shutdown_checkbox = self.crt_checkbox(_("Shutdown on download completion"), event_handler=self._on_shutdown)
        self.sudo_textctrl = self.crt_textctrl(wx.TE_PASSWORD)

        # Build the menu for the custom format button
        self.custom_format_menu = self._build_custom_format_menu()

        self._set_layout()

        if os.name == "nt":
            self.sudo_textctrl.Hide()

        self.sudo_textctrl.SetToolTip(wx.ToolTip(_("SUDO password"))) 
開發者ID:MrS0m30n3,項目名稱:youtube-dl-gui,代碼行數:33,代碼來源:optionsframe.py

示例6: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def __init__(self):
        self.result = None
        wx.Dialog.__init__(self, eg.document.frame)
        staticText = wx.StaticText(
            self, -1, "Please enter your master password:"
        )
        self.passwordCtrl = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        self.buttonRow = eg.ButtonRow(self, (wx.ID_OK, wx.ID_CANCEL))
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(staticText, 0, wx.EXPAND | wx.ALL, 5)
        sizer.Add(self.passwordCtrl, 0, wx.EXPAND | wx.ALL, 5)
        sizer.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        sizer.Add(self.buttonRow.sizer, 0, wx.ALIGN_CENTER)
        self.SetSizerAndFit(sizer) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:16,代碼來源:Password.py

示例7: Configure

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def Configure(self, port=1024, password="", prefix="TCP"):
        text = self.text
        panel = eg.ConfigPanel()
        portCtrl = panel.SpinIntCtrl(port, max=65535)
        passwordCtrl = panel.TextCtrl(password, style=wx.TE_PASSWORD)
        eventPrefixCtrl = panel.TextCtrl(prefix)
        st1 = panel.StaticText(text.port)
        st2 = panel.StaticText(text.password)
        st3 = panel.StaticText(text.eventPrefix)
        eg.EqualizeWidths((st1, st2, st3))
        box1 = panel.BoxedGroup(text.tcpBox, (st1, portCtrl))
        box2 = panel.BoxedGroup(text.securityBox, (st2, passwordCtrl))
        box3 = panel.BoxedGroup(
            text.eventGenerationBox, (st3, eventPrefixCtrl)
        )
        panel.sizer.AddMany([
            (box1, 0, wx.EXPAND),
            (box2, 0, wx.EXPAND|wx.TOP, 10),
            (box3, 0, wx.EXPAND|wx.TOP, 10),
        ])
        while panel.Affirmed():
            panel.SetResult(
                portCtrl.GetValue(),
                passwordCtrl.GetValue(),
                eventPrefixCtrl.GetValue()
            ) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:28,代碼來源:__init__.py

示例8: Configure

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def Configure(self, port=1025, password="", prefix="Apple"):
        text = self.text
        panel = eg.ConfigPanel()

        portCtrl = panel.SpinIntCtrl(port, max=65535)
        passwordCtrl = panel.TextCtrl(password, style=wx.TE_PASSWORD)
        eventPrefixCtrl = panel.TextCtrl(prefix)
        st1 = panel.StaticText(text.port)
        st2 = panel.StaticText(text.password)
        st3 = panel.StaticText(text.eventPrefix)
        eg.EqualizeWidths((st1, st2, st3))
        box1 = panel.BoxedGroup(text.tcpBox, (st1, portCtrl))
        box2 = panel.BoxedGroup(text.securityBox, (st2, passwordCtrl))
        box3 = panel.BoxedGroup(
            text.eventGenerationBox, (st3, eventPrefixCtrl)
        )
        panel.sizer.AddMany([
            (box1, 0, wx.EXPAND),
            (box2, 0, wx.EXPAND|wx.TOP, 10),
            (box3, 0, wx.EXPAND|wx.TOP, 10),
        ])

        while panel.Affirmed():
            panel.SetResult(
                portCtrl.GetValue(),
                passwordCtrl.GetValue(),
                eventPrefixCtrl.GetValue()
            ) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:30,代碼來源:__init__.py

示例9: Configure

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TE_PASSWORD [as 別名]
def Configure(self, host="127.0.0.1", port=1024, password=""):
        text = self.text
        panel = eg.ConfigPanel()
        hostCtrl = panel.TextCtrl(host)
        portCtrl = panel.SpinIntCtrl(port, max=65535)
        passwordCtrl = panel.TextCtrl(password, style=wx.TE_PASSWORD)

        st1 = panel.StaticText(text.host)
        st2 = panel.StaticText(text.port)
        st3 = panel.StaticText(text.password)
        eg.EqualizeWidths((st1, st2, st3))
        tcpBox = panel.BoxedGroup(
            text.tcpBox,
            (st1, hostCtrl),
            (st2, portCtrl),
        )
        securityBox = panel.BoxedGroup(
            text.securityBox,
            (st3, passwordCtrl),
        )

        panel.sizer.Add(tcpBox, 0, wx.EXPAND)
        panel.sizer.Add(securityBox, 0, wx.TOP|wx.EXPAND, 10)

        while panel.Affirmed():
            panel.SetResult(
                hostCtrl.GetValue(),
                portCtrl.GetValue(),
                passwordCtrl.GetValue()
            ) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:32,代碼來源:__init__.py


注:本文中的wx.TE_PASSWORD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。