当前位置: 首页>>代码示例>>Python>>正文


Python wx.WrapSizer方法代码示例

本文整理汇总了Python中wx.WrapSizer方法的典型用法代码示例。如果您正苦于以下问题:Python wx.WrapSizer方法的具体用法?Python wx.WrapSizer怎么用?Python wx.WrapSizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wx的用法示例。


在下文中一共展示了wx.WrapSizer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _set_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import WrapSizer [as 别名]
def _set_layout(self):
        main_sizer = wx.BoxSizer(wx.HORIZONTAL)
        vertical_sizer = wx.BoxSizer(wx.VERTICAL)

        vertical_sizer.Add(self.cmdline_args_label)
        vertical_sizer.Add(self.cmdline_args_textctrl, 1, wx.EXPAND | wx.ALL, border=5)

        vertical_sizer.Add(self.extra_opts_label, flag=wx.TOP, border=5)

        extra_opts_sizer = wx.WrapSizer()
        extra_opts_sizer.Add(self.youtube_dl_debug_checkbox)
        extra_opts_sizer.AddSpacer((5, -1))
        extra_opts_sizer.Add(self.ignore_errors_checkbox)
        extra_opts_sizer.AddSpacer((5, -1))
        extra_opts_sizer.Add(self.ignore_config_checkbox)
        extra_opts_sizer.AddSpacer((5, -1))
        extra_opts_sizer.Add(self.no_mtime_checkbox)
        extra_opts_sizer.AddSpacer((5, -1))
        extra_opts_sizer.Add(self.native_hls_checkbox)

        vertical_sizer.Add(extra_opts_sizer, flag=wx.ALL, border=5)

        main_sizer.Add(vertical_sizer, 1, wx.EXPAND | wx.ALL, border=5)
        self.SetSizer(main_sizer) 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:26,代码来源:optionsframe.py

示例2: create_sizer_diaginch_override

# 需要导入模块: import wx [as 别名]
# 或者: from wx import WrapSizer [as 别名]
def create_sizer_diaginch_override(self):
        self.sizer_setting_diaginch.Clear(True)
        # statbox_parent_diaginch = self.sizer_setting_diaginch.GetStaticBox()
        statbox_parent_diaginch = self
        self.cb_diaginch = wx.CheckBox(statbox_parent_diaginch, -1, "Input display sizes manually")
        self.cb_diaginch.Bind(wx.EVT_CHECKBOX, self.onCheckboxDiaginch)
        st_diaginch = wx.StaticText(
            statbox_parent_diaginch, -1,
            "Display diagonal sizes (inches):"
        )
        st_diaginch.Disable()
        self.sizer_setting_diaginch.Add(self.cb_diaginch, 0, wx.ALIGN_LEFT|wx.LEFT, 0)
        self.sizer_setting_diaginch.Add(st_diaginch, 0, wx.ALIGN_LEFT|wx.LEFT, 10)
        # diag size data for fields
        diags = [str(dsp.diagonal_size()[1]) for dsp in self.display_sys.disp_list]
        # sizer for textctrls
        tc_list_sizer_diag = wx.WrapSizer(wx.HORIZONTAL)
        self.tc_list_diaginch = self.list_of_textctrl(statbox_parent_diaginch, wpproc.NUM_DISPLAYS, fraction=2/5)
        for tc, diag in zip(self.tc_list_diaginch, diags):
            tc_list_sizer_diag.Add(tc, 0, wx.ALIGN_LEFT|wx.ALL, 5)
            tc.ChangeValue(diag)
            tc.Disable()
        self.button_diaginch_save = wx.Button(statbox_parent_diaginch, label="Save")
        self.button_diaginch_save.Bind(wx.EVT_BUTTON, self.onSaveDiagInch)
        tc_list_sizer_diag.Add(self.button_diaginch_save, 0, wx.ALL, 5)
        self.button_diaginch_save.Disable()
        self.sizer_setting_diaginch.Add(tc_list_sizer_diag, 0, wx.ALIGN_LEFT|wx.LEFT, 5)
        self.sizer_setting_adv.Layout()
        self.sizer_main.Layout()
        self.sizer_main.Fit(self.frame)
        # Check cb according to DisplaySystem 'use_user_diags'
        self.cb_diaginch.SetValue(self.display_sys.use_user_diags)
        # Update sizer content based on new cb state
        self.onCheckboxDiaginch(None) 
开发者ID:hhannine,项目名称:superpaper,代码行数:36,代码来源:gui.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import WrapSizer [as 别名]
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title='视频下载器', pos=wx.DefaultPosition,
                          size=wx.Size(-1, 420), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
        self.SetBackgroundColour(wx.Colour(240, 240, 240))
        self.SetMinSize(wx.Size(390, 420))
        self.SetMaxSize(wx.Size(390, 420))
        self.global_sizer = wx.BoxSizer(wx.VERTICAL)

        self.sizer_items = wx.BoxSizer(wx.VERTICAL)
        self.sizer_blocks = wx.WrapSizer(wx.HORIZONTAL)
        self.sizer_total = wx.BoxSizer(wx.HORIZONTAL)

        self.text_name = None
        self.gauge_total = None
        self.text_speed = None
        self.text_percent = None
        self.total = None
        self.text_progress = wx.StaticText(self, wx.ID_ANY, '', wx.DefaultPosition,
                                          wx.DefaultSize, wx.ALIGN_RIGHT)

        self.text_title = wx.StaticText(self, wx.ID_ANY, '', wx.DefaultPosition,
                                          wx.Size(150, -1), wx.ALIGN_LEFT)

        staticline1 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
        staticline2 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
        staticline3 = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)

        self.sizer_top = wx.BoxSizer(wx.HORIZONTAL)

        # self.global_sizer.Add(self.text_title, 0, wx.EXPAND | wx.ALL, 5)
        self.sizer_top.Add(self.text_title, 2, wx.EXPAND | wx.ALL, 5)
        self.sizer_top.Add(self.text_progress, 1, wx.EXPAND | wx.ALL | wx.ALIGN_RIGHT, 5)

        self.global_sizer.Add(self.sizer_top, 0, wx.EXPAND | wx.ALL, 5)

        self.global_sizer.Add(staticline1, 0, wx.EXPAND | wx.ALL, 5)
        self.global_sizer.Add(self.sizer_items, 1, wx.ALL | wx.EXPAND, 3)
        self.global_sizer.Add(staticline2, 0, wx.EXPAND | wx.ALL, 5)
        self.global_sizer.Add(self.sizer_blocks, 0, wx.ALL | wx.EXPAND, 5)
        self.global_sizer.Add(staticline3, 0, wx.EXPAND | wx.ALL, 5)
        self.global_sizer.Add(self.sizer_total, 0, wx.ALL | wx.EXPAND, 5)

        self.menu_bar = MainMenuBar(0)
        self.SetMenuBar(self.menu_bar)

        self.SetSizer(self.global_sizer)
        self.Layout()
        self.Center(wx.BOTH)

        self.items_list = []
        self.items_dict = {}
        self.block_list = []

        self.timer = wx.Timer()

        self.timer.SetOwner(self, wx.ID_ANY) 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:60,代码来源:frame_downloader.py


注:本文中的wx.WrapSizer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。