當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。