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


Python wx.LIST_FORMAT_RIGHT属性代码示例

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


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

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def __init__(self, parent, pos, size = wx.DefaultSize):
        ID = wx.NewId()
        style = wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES | wx.LC_SINGLE_SEL
        wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
        mons = [(i[0], i[1], i[2] - i[0], i[3] - i[1]) for i in [j[2] for j in Edm()]]
        for j, header in enumerate(eg.text.General.monitorsHeader):
            self.InsertColumn(j, header, wx.LIST_FORMAT_RIGHT)
            self.SetColumnWidth(j, wx.LIST_AUTOSIZE_USEHEADER)
        for i, mon in enumerate(mons):
            self.InsertStringItem(i, str(i + 1))
            self.SetStringItem(i, 1, str(mon[0]))
            self.SetStringItem(i, 2, str(mon[1]))
            self.SetStringItem(i, 3, str(mon[2]))
            self.SetStringItem(i, 4, str(mon[3]))
        rect = self.GetItemRect(0, wx.LIST_RECT_BOUNDS)
        self.hh = rect[1]  #header height
        self.ih = rect[3]  #item height
        size = self.GetRealSize()
        self.SetMinSize(size)
        self.SetSize(size) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:22,代码来源:MonitorsCtrl.py

示例2: create_sizer_paths

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def create_sizer_paths(self):
        self.sizer_setting_paths = wx.StaticBoxSizer(wx.VERTICAL, self, "Wallpaper paths")
        self.statbox_parent_paths = self.sizer_setting_paths.GetStaticBox()
        st_paths_info = wx.StaticText(self.statbox_parent_paths, -1, "Browse to add your wallpaper files or source folders here:")
        if self.use_multi_image:
            self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                              style=wx.LC_REPORT
                                              | wx.BORDER_SIMPLE
                                              | wx.LC_SORT_ASCENDING
                                             )
            self.path_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width = 100)
            self.path_listctrl.InsertColumn(1, 'Source', width = 400)
        else:
            # show simpler listing without header if only one wallpaper target
            self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                              style=wx.LC_REPORT
                                              | wx.BORDER_SIMPLE
                                              | wx.LC_NO_HEADER
                                             )
            self.path_listctrl.InsertColumn(0, 'Source', width = 500)
        self.path_listctrl.SetImageList(self.image_list, wx.IMAGE_LIST_SMALL)

        self.sizer_setting_paths.Add(st_paths_info, 0, wx.ALIGN_LEFT|wx.ALL, 5)
        self.sizer_setting_paths.Add(
            self.path_listctrl, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5
            )
        # Buttons
        self.sizer_setting_paths_buttons = wx.BoxSizer(wx.HORIZONTAL)
        self.button_browse = wx.Button(self.statbox_parent_paths, label="Browse")
        self.button_remove_source = wx.Button(self.statbox_parent_paths, label="Remove selected source")
        self.button_browse.Bind(wx.EVT_BUTTON, self.onBrowsePaths)
        self.button_remove_source.Bind(wx.EVT_BUTTON, self.onRemoveSource)
        self.sizer_setting_paths_buttons.Add(self.button_browse, 0, wx.CENTER|wx.ALL, 5)
        self.sizer_setting_paths_buttons.Add(self.button_remove_source, 0, wx.CENTER|wx.ALL, 5)
        # add button sizer to parent paths sizer
        self.sizer_setting_paths.Add(self.sizer_setting_paths_buttons, 0, wx.CENTER|wx.EXPAND|wx.ALL, 0)

        self.sizer_settings_right.Add(
            self.sizer_setting_paths, 1, wx.CENTER|wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, 5
        ) 
开发者ID:hhannine,项目名称:superpaper,代码行数:42,代码来源:gui.py

示例3: refresh_path_listctrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def refresh_path_listctrl(self, use_multi_image, migrate_paths=False):
        if use_multi_image == self.multi_column_listc and migrate_paths:
            self.sizer_main.Layout()
        else:
            if migrate_paths and self.path_listctrl.GetItemCount():
                # warn that paths can't be migrated
                msg = ("Wallpaper sources cannot be migrated between span"
                       " and multi image, continue?"
                       "\n"
                       "Saved sources are not affected until you overwrite.")
                res = show_message_dialog(msg, style="YES_NO")
                if not res:
                    # user canceled
                    return False
            self.path_listctrl.Destroy()
            self.image_list.RemoveAll()
            if use_multi_image:
                self.multi_column_listc = True
                self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                                 style=wx.LC_REPORT
                                                 | wx.BORDER_SIMPLE
                                                 | wx.LC_SORT_ASCENDING
                                                )
                self.path_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width=100)
                self.path_listctrl.InsertColumn(1, 'Source', width=400)
            else:
                self.multi_column_listc = False
                # show simpler listing without header if only one wallpaper target
                self.path_listctrl = wx.ListCtrl(self.statbox_parent_paths, -1,
                                                 style=wx.LC_REPORT
                                                 | wx.BORDER_SIMPLE
                                                 | wx.LC_NO_HEADER
                                                )
                self.path_listctrl.InsertColumn(0, 'Source', width=500)
            self.path_listctrl.SetImageList(self.image_list, wx.IMAGE_LIST_SMALL)
            self.sizer_setting_paths.Insert(1, self.path_listctrl, 1,
                                            wx.CENTER | wx.EXPAND | wx.ALL, 5)
            self.path_listctrl.InvalidateBestSize()
            self.sizer_main.Layout()
        return True 
开发者ID:hhannine,项目名称:superpaper,代码行数:42,代码来源:gui.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def __init__(self, bgapp, title):
        wx.Frame.__init__(self, None, title=title, pos=(50, 10), size=(1100, 450))
        self.bgapp = bgapp
        self.spewwait = clock()
        self.Bind(wx.EVT_CLOSE, self.OnClose)
        self.SetBackgroundColour(wx.Colour(255, 255, 255))
        fw = 12
        spewList = wx.ListCtrl(self, pos=(0, 0), size=(1000, 300), style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES)
        spewList.InsertColumn(0, 'Optimistic Unchoke', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(1, 'Peer ID', width=0)
        spewList.InsertColumn(2, 'IP', width=fw * 11)
        spewList.InsertColumn(3, 'Local/Remote', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(4, 'Up', format=wx.LIST_FORMAT_RIGHT, width=fw * 2)
        spewList.InsertColumn(5, 'Interested', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(6, 'Choking', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(7, 'Down', format=wx.LIST_FORMAT_RIGHT, width=fw * 8)
        spewList.InsertColumn(8, 'Interesting', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(9, 'Choked', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(10, 'Snubbed', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
        spewList.InsertColumn(11, 'Downloaded', format=wx.LIST_FORMAT_RIGHT, width=fw * 5)
        spewList.InsertColumn(12, 'Uploaded', format=wx.LIST_FORMAT_RIGHT, width=fw * 5)
        spewList.InsertColumn(13, 'Completed', format=wx.LIST_FORMAT_RIGHT, width=fw * 6)
        spewList.InsertColumn(14, 'Peer Download Speed', format=wx.LIST_FORMAT_RIGHT, width=fw * 10)
        spewList.InsertColumn(15, 'Requested Piece', format=wx.LIST_FORMAT_CENTER, width=fw * 6)
        spewList.InsertColumn(16, 'Received Piece', format=wx.LIST_FORMAT_CENTER, width=fw * 6)
        self.spewList = spewList
        labelVOD = wx.StaticText(self, -1, 'static text')
        self.labelVOD = labelVOD
        gridSizer = wx.FlexGridSizer(cols=1, vgap=5)
        gridSizer.Add(spewList, -1, wx.EXPAND)
        gridSizer.Add(labelVOD, -1, wx.EXPAND)
        self.SetSizer(gridSizer)
        self.bgapp.statFrame = self 
开发者ID:alesnav,项目名称:p2ptv-pi,代码行数:35,代码来源:systray.py

示例5: initColumn

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def initColumn(self):
        self.AppendColumn('Q', format=wx.LIST_FORMAT_RIGHT, width=50)
        self.AppendColumn('分辨率', format=wx.LIST_FORMAT_CENTER, width=80)
        self.AppendColumn('N', format=wx.LIST_FORMAT_RIGHT, width=40)
        self.AppendColumn('视频大小', width=80, format=wx.LIST_FORMAT_RIGHT)
        self.AppendColumn('音频', width=50, format=wx.LIST_FORMAT_CENTER)
        self.AppendColumn('格式', width=50, format=wx.LIST_FORMAT_LEFT)
        self.AppendColumn('M3U8', width=50, format=wx.LIST_FORMAT_CENTER) 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:10,代码来源:listctrl.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def __init__(self, parent, hwnds):
        wx.ListCtrl.__init__(self, parent, style=wx.LC_REPORT | wx.LC_SINGLE_SEL)
        listmix.ListCtrlAutoWidthMixin.__init__(self)
        imageList = wx.ImageList(16, 16)
        imageList.Add(GetInternalBitmap("cwindow"))
        self.AssignImageList(imageList, wx.IMAGE_LIST_SMALL)
        self.InsertColumn(0, "Program")
        self.InsertColumn(1, "Name")
        self.InsertColumn(2, "Class")
        self.InsertColumn(3, "Handle", wx.LIST_FORMAT_RIGHT)
        for hwnd in hwnds:
            imageIdx = 0
            icon = GetHwndIcon(hwnd)
            if icon:
                imageIdx = imageList.AddIcon(icon)
            idx = self.InsertImageStringItem(
                sys.maxint,
                GetWindowProcessName(hwnd),
                imageIdx
            )
            self.SetStringItem(idx, 1, GetWindowText(hwnd))
            self.SetStringItem(idx, 2, GetClassName(hwnd))
            self.SetStringItem(idx, 3, str(hwnd))
        for i in range(4):
            self.SetColumnWidth(i, -2)
            headerSize = self.GetColumnWidth(i)
            self.SetColumnWidth(i, -1)
            labelSize = self.GetColumnWidth(i)
            if headerSize > labelSize:
                self.SetColumnWidth(i, headerSize) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:32,代码来源:WindowList.py

示例7: GetColumnAlignments

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def GetColumnAlignments(self, olv, left, right):
        """
        Return the alignments of the given slice of columns
        """
        listAlignments = [olv.GetColumn(i).GetAlign() for i in range(left, right+1)]
        mapping = {
            wx.LIST_FORMAT_LEFT: wx.ALIGN_LEFT,
            wx.LIST_FORMAT_RIGHT: wx.ALIGN_RIGHT,
            wx.LIST_FORMAT_CENTRE: wx.ALIGN_CENTRE,
        }
        return [mapping[x] for x in listAlignments] 
开发者ID:JackonYang,项目名称:bookhub,代码行数:13,代码来源:OLVPrinter.py

示例8: GetColumnAlignments

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def GetColumnAlignments(self, lv, left, right):
        """
        Return the alignments of the given slice of columns
        """
        listAlignments = [lv.GetColumn(i).GetAlign() for i in range(left, right+1)]
        mapping = {
            wx.LIST_FORMAT_LEFT: wx.ALIGN_LEFT,
            wx.LIST_FORMAT_RIGHT: wx.ALIGN_RIGHT,
            wx.LIST_FORMAT_CENTRE: wx.ALIGN_CENTRE,
        }
        return [mapping[x] for x in listAlignments]



#---------------------------------------------------------------------------- 
开发者ID:JackonYang,项目名称:bookhub,代码行数:17,代码来源:ListCtrlPrinter.py

示例9: GetAlignment

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def GetAlignment(self):
        """
        Return the alignment that this column uses
        """
        alignment = {
            "l": wx.LIST_FORMAT_LEFT,
            "c": wx.LIST_FORMAT_CENTRE,
            "r": wx.LIST_FORMAT_RIGHT
        }.get(self.align[:1], wx.LIST_FORMAT_LEFT)

        return alignment 
开发者ID:JackonYang,项目名称:bookhub,代码行数:13,代码来源:ObjectListView.py

示例10: create_paths_listctrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_RIGHT [as 别名]
def create_paths_listctrl(self, use_multi_image):
        if use_multi_image:
            self.paths_listctrl = wx.ListCtrl(self, -1,
                                              size=(-1, -1),
                                              style=wx.LC_REPORT
                                              #  | wx.BORDER_SUNKEN
                                              | wx.BORDER_SIMPLE
                                              #  | wx.BORDER_STATIC
                                              #  | wx.BORDER_THEME
                                              #  | wx.BORDER_NONE
                                              #  | wx.LC_EDIT_LABELS
                                              | wx.LC_SORT_ASCENDING
                                              #  | wx.LC_NO_HEADER
                                              #  | wx.LC_VRULES
                                              #  | wx.LC_HRULES
                                              #  | wx.LC_SINGLE_SEL
                                             )
            self.paths_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width=100)
            self.paths_listctrl.InsertColumn(1, 'Source', width=620)
        else:
            # show simpler listing without header if only one wallpaper target
            self.paths_listctrl = wx.ListCtrl(self, -1,
                                              size=(-1, -1),
                                              style=wx.LC_REPORT
                                              #  | wx.BORDER_SUNKEN
                                              | wx.BORDER_SIMPLE
                                              #  | wx.BORDER_STATIC
                                              #  | wx.BORDER_THEME
                                              #  | wx.BORDER_NONE
                                              #  | wx.LC_EDIT_LABELS
                                              #  | wx.LC_SORT_ASCENDING
                                              | wx.LC_NO_HEADER
                                              #  | wx.LC_VRULES
                                              #  | wx.LC_HRULES
                                              #  | wx.LC_SINGLE_SEL
                                             )
            self.paths_listctrl.InsertColumn(0, 'Source', width=720)

        # Add the item list to the control
        self.paths_listctrl.SetImageList(self.il, wx.IMAGE_LIST_SMALL)

        self.sizer_paths_list.Add(self.paths_listctrl, 1, wx.CENTER|wx.ALL|wx.EXPAND, 5) 
开发者ID:hhannine,项目名称:superpaper,代码行数:44,代码来源:configuration_dialogs.py


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