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


Python wx.LIST_NEXT_ALL属性代码示例

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


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

示例1: OnInsertName

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def OnInsertName(self, event):
        item = self.list.GetNextItem(-1, wx.LIST_NEXT_ALL,
                                     wx.LIST_STATE_SELECTED)

        if item == -1:
            return

        # this seems to return column 0's text, which is lucky, because I
        # don't see a way of getting other columns' texts...
        name = self.list.GetItemText(item)

        for ch in name:
            self.ctrl.OnKeyChar(util.MyKeyEvent(ord(ch))) 
开发者ID:trelby,项目名称:trelby,代码行数:15,代码来源:namesdlg.py

示例2: _ListCtrl_GetFocusedItem

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def _ListCtrl_GetFocusedItem(self):
    """
    Gets the currently focused item or -1 if none is focused.
    """
    return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:7,代码来源:core.py

示例3: _ListCtrl_GetNextSelected

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def _ListCtrl_GetNextSelected(self, item):
    """
    Returns subsequent selected items, or -1 when no more are selected.
    """
    return self.GetNextItem(item, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:7,代码来源:core.py

示例4: get_selected_items

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def get_selected_items(self):
        """
        Gets the selected items for the list control.
        Selection is returned as a list of selected indices,
        low to high.
        """
        selection = []
        current = -1    # start at -1 to get the first selected item
        while True:
            next = self.GetNextItem(current, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
            if next == -1:
                return selection
            else:
                selection.append(next)
                current = next 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:17,代码来源:dfgui.py

示例5: get_selected

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def get_selected(self):
        return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:4,代码来源:mainframe.py

示例6: OnCmdCopy

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def OnCmdCopy(self, dummyEvent=None):
        text = ""
        lines = 1
        firstItem = item = self.GetNextItem(
            -1,
            wx.LIST_NEXT_ALL,
            wx.LIST_STATE_SELECTED
        )
        if item != -1:
            text = self.OnGetItemText(item, 0)[1:]
            item = self.GetNextItem(
                item,
                wx.LIST_NEXT_ALL,
                wx.LIST_STATE_SELECTED
            )
            while item != -1:
                lines += 1
                text += "\r\n" + self.OnGetItemText(item, 0)[1:]
                item = self.GetNextItem(
                    item,
                    wx.LIST_NEXT_ALL,
                    wx.LIST_STATE_SELECTED
                )
        if text != "" and wx.TheClipboard.Open():
            textDataObject = wx.TextDataObject(text)
            dataObjectComposite = wx.DataObjectComposite()
            dataObjectComposite.Add(textDataObject)
            if lines == 1:
                eventstring, icon = self.GetItemData(firstItem)[:2]
                if icon == EVENT_ICON:
                    customDataObject = wx.CustomDataObject("DragEventItem")
                    customDataObject.SetData(eventstring.encode("UTF-8"))
                    dataObjectComposite.Add(customDataObject)

            wx.TheClipboard.SetData(dataObjectComposite)
            wx.TheClipboard.Close()
            wx.TheClipboard.Flush() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:39,代码来源:LogCtrl.py

示例7: GetFocusedRow

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def GetFocusedRow(self):
        """
        Return the index of the row that has the focus. -1 means no focus
        """
        return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED) 
开发者ID:JackonYang,项目名称:bookhub,代码行数:7,代码来源:ObjectListView.py

示例8: YieldSelectedObjects

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def YieldSelectedObjects(self):
        """
        Progressively yield the selected modelObjects
        """
        i = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
        while i != -1:
            yield self.GetObjectAt(i)
            i = self.GetNextItem(i, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)


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

示例9: GetSelectedGroups

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def GetSelectedGroups(self):
        """
        Return a list of the groups that are selected
        """
        selectedGroups = list()
        i = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
        while i != -1:
            model = self.innerList[i]
            if isinstance(model, ListGroup):
                selectedGroups.append(model)
            i = self.GetNextItem(i, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
        return selectedGroups 
开发者ID:JackonYang,项目名称:bookhub,代码行数:14,代码来源:ObjectListView.py

示例10: OnSearch

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_NEXT_ALL [as 别名]
def OnSearch(self, event = None):
        l = []

        wx.BeginBusyCursor()

        s = util.lower(misc.fromGUI(self.searchEntry.GetValue()))
        sex = self.sexRb.GetSelection()
        nt = self.nameRb.GetSelection()

        selTypes = {}
        item = -1

        while 1:
            item = self.typeList.GetNextItem(item, wx.LIST_NEXT_ALL,
                wx.LIST_STATE_SELECTED)

            if item == -1:
                break

            selTypes[self.typeList.GetItemData(item)] = True

        if len(selTypes) == len(nameArr.typeNamesCnt):
            doTypes = False
        else:
            doTypes = True

        for i in xrange(nameArr.count):
            if (sex != 2) and (sex == nameArr.sex[i]):
                continue

            if doTypes and nameArr.type[i] not in selTypes:
                continue

            if s:
                name = util.lower(nameArr.name[i])

                if nt == 0:
                    if not name.startswith(s):
                        continue
                elif nt == 1:
                    if name.find(s) == -1:
                        continue
                elif nt == 2:
                    if not name.endswith(s):
                        continue

            l.append(i)

        self.list.items = l
        self.list.SetItemCount(len(l))
        self.list.EnsureVisible(0)

        wx.EndBusyCursor()

        self.foundLabel.SetLabel("%d names found." % len(l)) 
开发者ID:trelby,项目名称:trelby,代码行数:57,代码来源:namesdlg.py


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