def init ( self, parent ): """ Finishes initializing the editor by creating the underlying toolkit widget. """ factory = self.factory.factory if factory is not None: try: self.control = factory( *(( parent, self ) + self.factory.args ) ) except: open_fbi() if self.control is None: self.control = QtGui.QLabel( 'An error occurred creating a custom editor.\n' 'Please contact the developer.') self.control.setStyleSheet("background-color: red; color: white") self.set_tooltip()
def init ( self, parent ): """ Finishes initializing the editor by creating the underlying toolkit widget. """ factory = self.factory.factory if factory is not None: try: self.control = factory( *(( parent, self ) + self.factory.args ) ) except: open_fbi() if self.control is None: self.control = control = wx.StaticText( parent, -1, 'An error occurred creating a custom editor.\n' 'Please contact the developer.' ) control.SetBackgroundColour( wx.RED ) control.SetForegroundColour( wx.WHITE ) self.set_tooltip()