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


Python wx.NOT_FOUND属性代码示例

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


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

示例1: redraw

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def redraw(self):
        column_index1 = self.combo_box1.GetSelection()
        column_index2 = self.combo_box2.GetSelection()
        if column_index1 != wx.NOT_FOUND and column_index1 != 0 and \
           column_index2 != wx.NOT_FOUND and column_index2 != 0:
            # subtract one to remove the neutral selection index
            column_index1 -= 1
            column_index2 -= 1
            df = self.df_list_ctrl.get_filtered_df()

            # It looks like using pandas dataframe.plot causes something weird to
            # crash in wx internally. Therefore we use plain axes.plot functionality.
            # column_name1 = self.columns[column_index1]
            # column_name2 = self.columns[column_index2]
            # df.plot(kind='scatter', x=column_name1, y=column_name2)

            if len(df) > 0:
                self.axes.clear()
                self.axes.plot(df.iloc[:, column_index1].values, df.iloc[:, column_index2].values, 'o', clip_on=False)

                self.canvas.draw() 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:23,代码来源:dfgui.py

示例2: _insert

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _insert(self, x, y, text):
        """ Insert text at given x, y coordinates --- used with drag-and-drop. """

        # Clean text.
        import string
        text = filter(lambda x: x in (string.letters + string.digits + string.punctuation + ' '), text)

        # Find insertion point.
        index, flags = self.HitTest((x, y))

        if index == wx.NOT_FOUND:
            if flags & wx.LIST_HITTEST_NOWHERE:
                index = self.GetItemCount()
            else:
                return

        # Get bounding rectangle for the item the user is dropping over.
        rect = self.GetItemRect(index)

        # If the user is dropping into the lower half of the rect, we want to insert _after_ this item.
        if y > rect.y + rect.height/2:
            index += 1

        self.InsertStringItem(index, text) 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:26,代码来源:dnd_list.py

示例3: RefreshTable

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def RefreshTable(self):
        selected = self.IndexList.GetSelection()
        if selected != wx.NOT_FOUND:
            index = self.ListIndex[selected]
            if index > 0x260 and self.Editable:
                self.CallbackCheck.Enable()
                self.CallbackCheck.SetValue(self.Manager.HasCurrentEntryCallbacks(index))
            result = self.Manager.GetCurrentEntryValues(index)
            if result != None:
                self.Table.SetCurrentIndex(index)
                data, editors = result
                self.Table.SetData(data)
                self.Table.SetEditors(editors)
                self.Table.ResetView(self.SubindexGrid)
        self.ParentWindow.RefreshStatusBar()

#-------------------------------------------------------------------------------
#                        Editing Table value function
#------------------------------------------------------------------------------- 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:21,代码来源:subindextable.py

示例4: OnAddToDCFSubindexMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def OnAddToDCFSubindexMenu(self, event):
        if not self.Editable:
            selected = self.IndexList.GetSelection()
            if selected != wx.NOT_FOUND:
                index = self.ListIndex[selected]
                subindex = self.SubindexGrid.GetGridCursorRow()
                entry_infos = self.Manager.GetEntryInfos(index)
                if not entry_infos["struct"] & OD_MultipleSubindexes or subindex != 0:
                    subentry_infos = self.Manager.GetSubentryInfos(index, subindex)
                    typeinfos = self.Manager.GetEntryInfos(subentry_infos["type"])
                    if typeinfos:
                        node_id = self.ParentWindow.GetCurrentNodeId()
                        value = self.Table.GetValueByName(subindex, "value")
                        if value == "True":
                            value = 1
                        elif value == "False":
                            value = 0
                        elif value.isdigit():
                            value = int(value)
                        elif value.startswith("0x"):
                            value = int(value, 16)
                        else:
                            value = int(value.encode("hex_codec"), 16)
                        self.Manager.AddToMasterDCF(node_id, index, subindex, max(1, typeinfos["size"] / 8), value)    
                        self.ParentWindow.OpenMasterDCFDialog(node_id) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:27,代码来源:subindextable.py

示例5: OnModifyIndexMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def OnModifyIndexMenu(self, event):
        if self.Editable:
            selected = self.IndexList.GetSelection()
            if selected != wx.NOT_FOUND:
                index = self.ListIndex[selected]
                if self.Manager.IsCurrentEntry(index) and index < 0x260:
                    values, valuetype = self.Manager.GetCustomisedTypeValues(index)
                    dialog = UserTypeDialog(self)
                    dialog.SetTypeList(self.Manager.GetCustomisableTypes(), values[1])
                    if valuetype == 0:
                        dialog.SetValues(min = values[2], max = values[3])
                    elif valuetype == 1:
                        dialog.SetValues(length = values[2])
                    if dialog.ShowModal() == wx.ID_OK:
                        type, min, max, length = dialog.GetValues()
                        self.Manager.SetCurrentUserType(index, type, min, max, length)
                        self.ParentWindow.RefreshBufferState()
                        self.RefreshIndexList() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:20,代码来源:subindextable.py

示例6: OnDeleteSubindexMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def OnDeleteSubindexMenu(self, event):
        if self.Editable:
            selected = self.IndexList.GetSelection()
            if selected != wx.NOT_FOUND:
                index = self.ListIndex[selected]
                if self.Manager.IsCurrentEntry(index):
                    dialog = wx.TextEntryDialog(self, _("Number of subindexes to delete:"),
                                 _("Delete subindexes"), "1", wx.OK|wx.CANCEL)
                    if dialog.ShowModal() == wx.ID_OK:
                        try:
                            number = int(dialog.GetValue())
                            self.Manager.RemoveSubentriesFromCurrent(index, number)
                            self.ParentWindow.RefreshBufferState()
                            self.RefreshIndexList()
                        except:
                            message = wx.MessageDialog(self, _("An integer is required!"), _("ERROR"), wx.OK|wx.ICON_ERROR)
                            message.ShowModal()
                            message.Destroy()
                    dialog.Destroy() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:21,代码来源:subindextable.py

示例7: clear_link_details

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def clear_link_details(self):
        self.linkType.SetSelection(wx.NOT_FOUND)
        self.fromLeft.SetValue("")
        self.fromTop.SetValue("")
        self.fromHeight.SetValue("")
        self.fromWidth.SetValue("")
        self.toFile.ChangeValue("")
        self.toPage.ChangeValue("")
        self.toHeight.ChangeValue("")
        self.toLeft.ChangeValue("")
        self.toURI.ChangeValue("")
        self.toName.ChangeValue("")
        self.toName.Disable()
        self.btn_Update.Disable()
        self.t_Update.Label = ""
        self.toFile.Disable()
        self.toLeft.Disable()
        self.toHeight.Disable()
        self.toURI.Disable()
        self.toPage.Disable()
        self.adding_link = False
        self.resize_rect = False
        
        return 
开发者ID:pymupdf,项目名称:PyMuPDF-Utilities,代码行数:26,代码来源:PDFLinkMaint.py

示例8: RefreshNameList

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def RefreshNameList(self):
        """
        Called to refresh names in name list box
        """
        # Get variable class to select POU variable applicable
        var_class = self.VARIABLE_CLASSES_DICT_REVERSE[
            self.Class.GetStringSelection()]

        # Refresh names in name list box by selecting variables in POU variables
        # list that can be applied to variable class
        self.VariableName.Clear()
        for name, (var_type, _value_type) in self.VariableList.iteritems():
            if var_type != "Input" or var_class == INPUT:
                self.VariableName.Append(name)

        # Get variable expression and select corresponding value in name list
        # box if it exists
        selected = self.Expression.GetValue()
        if selected != "" and self.VariableName.FindString(selected) != wx.NOT_FOUND:
            self.VariableName.SetStringSelection(selected)
        else:
            self.VariableName.SetSelection(wx.NOT_FOUND)

        # Disable name list box if no name present inside
        self.VariableName.Enable(self.VariableName.GetCount() > 0) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:27,代码来源:FBDVariableDialog.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def __init__(self, parent, gps):
        self._gps = gps

        pre = wx.PreDialog()
        self._ui = load_ui('DialogGps.xrc')
        self._ui.LoadOnDialog(pre, parent, 'DialogGps')
        self.PostCreate(pre)

        self._checkEnable = xrc.XRCCTRL(pre, 'checkEnable')
        self._choicePort = xrc.XRCCTRL(pre, 'choicePort')
        self._choiceBaud = xrc.XRCCTRL(pre, 'choiceBaud')
        self._buttonOk = xrc.XRCCTRL(pre, 'wxID_OK')

        self._checkEnable.SetValue(gps.enabled)
        self._choicePort.AppendItems(gps.get_ports())
        port = self._choicePort.FindString(gps.port)
        if port == wx.NOT_FOUND:
            port = 0
        self._choicePort.SetSelection(port)
        self._choiceBaud.AppendItems(map(str, gps.get_bauds()))
        baud = self._choiceBaud.FindString(str(gps.baud))
        if baud == wx.NOT_FOUND:
            baud = 0
        self._choiceBaud.SetSelection(baud)

        self.Bind(wx.EVT_BUTTON, self.__on_ok, self._buttonOk) 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:28,代码来源:dialog_gps.py

示例10: update

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def update(self, observable, handlers):
        """Toolbar ReaderObserver callback that is notified when
        readers are added or removed."""
        addedreaders, removedreaders = handlers
        for reader in addedreaders:
            item = self.Append(str(reader))
            self.SetClientData(item, reader)
        for reader in removedreaders:
            item = self.FindString(str(reader))
            if wx.NOT_FOUND != item:
                self.Delete(item)
        selection = self.GetSelection()
        #if wx.NOT_FOUND == selection:
        #    self.SetSelection(0) 
开发者ID:LudovicRousseau,项目名称:pyscard,代码行数:16,代码来源:ReaderToolbar.py

示例11: _buttonDeleteApplicationOnButtonClick

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _buttonDeleteApplicationOnButtonClick(self, event):
        app_id_index = self._choiceDESFireApplications.GetSelection()
        if app_id_index == NOT_FOUND:
            self._Log('DESFire select application: No application selected.', wx.LOG_Warning)
            return
        app_id = self._choiceDESFireApplications.GetString(app_id_index)
        self.__controller.desfireDeleteApplication(int(app_id, 0x10)) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:9,代码来源:pyResManDialog.py

示例12: _buttonSelectApplicationOnButtonClick

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _buttonSelectApplicationOnButtonClick(self, event):
        app_id_index = self._choiceDESFireApplications.GetSelection()
        if app_id_index == NOT_FOUND:
            self._Log('DESFire select application: No application selected.', wx.LOG_Warning)
            return
        app_id = self._choiceDESFireApplications.GetString(app_id_index)
        self.__controller.desfireSelectApplication(int(app_id, 0x10)) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:9,代码来源:pyResManDialog.py

示例13: _buttonGetFileSettingsOnButtonClick

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _buttonGetFileSettingsOnButtonClick(self, event):
        file_id_index = self._choiceDESFireFiles.GetSelection()
        if file_id_index == NOT_FOUND:
            self._Log('Get file settings: no file selected.', wx.LOG_Warning)
            return
        file_id = self._choiceDESFireFiles.GetString(file_id_index)
        self.__controller.desfireGetFileSettings(int(file_id, 0x10)) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:9,代码来源:pyResManDialog.py

示例14: _buttonDeleteFileOnButtonClick

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _buttonDeleteFileOnButtonClick(self, event):
        file_id_index = self._choiceDESFireFiles.GetSelection()
        if file_id_index == NOT_FOUND:
            self._Log('Get file settings: no file selected.', wx.LOG_Warning)
            return
        file_id = self._choiceDESFireFiles.GetString(file_id_index)
        self.__controller.desfireDeleteFile(int(file_id, 0x10)) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:9,代码来源:pyResManDialog.py

示例15: _choiceDESFireFilesOnChoice

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NOT_FOUND [as 别名]
def _choiceDESFireFilesOnChoice(self, event):
        file_id_index = self._choiceDESFireFiles.GetSelection()
        if file_id_index == NOT_FOUND:
            self._Log('Get file settings: no file selected.', wx.LOG_Warning)
            return
        file_id = self._choiceDESFireFiles.GetString(file_id_index)
        self.__controller.desfireGetFileSettings(int(file_id, 0x10)) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:9,代码来源:pyResManDialog.py


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