def __init__(self, parent, Document, matches, positions):
        drSingleChoiceDialog.__init__(self, parent, "Source Browser Go To", matches, False, SetSizer=False)

        self.Document = Document

        self.positions = positions

        self.txtLine = wx.TextCtrl(self, -1, "", (0, 0), (350, -1), style=wx.TE_READONLY)
        self.txtDefinedIn = wx.TextCtrl(self, -1, "", (0, 0), (350, -1), style=wx.TE_READONLY)

        self.lineSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.lineSizer.Add(wx.StaticText(self, -1, "  "), 0, wx.SHAPED)
        self.lineSizer.Add(self.txtLine, 1, wx.EXPAND)
        self.lineSizer.Add(wx.StaticText(self, -1, "  "), 0, wx.SHAPED)

        self.defSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.defSizer.Add(wx.StaticText(self, -1, "  "), 0, wx.SHAPED)
        self.defSizer.Add(self.txtDefinedIn, 1, wx.EXPAND)
        self.defSizer.Add(wx.StaticText(self, -1, "  "), 0, wx.SHAPED)

        self.theSizer.Insert(2, wx.StaticText(self, -1, "  "), 0, wx.SHAPED)
        self.theSizer.Insert(3, self.lineSizer, 0, wx.EXPAND)
        self.theSizer.Insert(4, self.defSizer, 0, wx.EXPAND)

        self.SetSizerAndFit(self.theSizer)

        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelected, id=self.ID_CHOICES)

        self.OnSelected(None)
Exemplo n.º 2
0
    def __init__(self, parent, Document, matches, positions):
        drSingleChoiceDialog.__init__(self, parent, 'Source Browser Go To', matches, False, SetSizer=False)

        self.Document = Document

        self.positions = positions

        self.txtLine = wx.TextCtrl(self, -1, '', (0, 0), (350, -1), style=wx.TE_READONLY)
        self.txtDefinedIn = wx.TextCtrl(self, -1, '', (0, 0), (350, -1), style=wx.TE_READONLY)

        self.lineSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.lineSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.lineSizer.Add(self.txtLine, 1, wx.EXPAND)
        self.lineSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)

        self.defSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.defSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.defSizer.Add(self.txtDefinedIn, 1, wx.EXPAND)
        self.defSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)

        self.theSizer.Insert(2, wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.theSizer.Insert(3, self.lineSizer, 0, wx.EXPAND)
        self.theSizer.Insert(4, self.defSizer, 0, wx.EXPAND)

        self.SetSizerAndFit(self.theSizer)

        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelected, id=self.ID_CHOICES)

        self.OnSelected(None)
        if parent.PLATFORM_IS_GTK: #does not get initially the focus (bug tracker #1903778, "Open Imported Module: focus problem", 29.02.2008: from Jon White, thanks.
            self.SetFocus()
	def __init__(self, parent, modulelist, point=wx.DefaultPosition, size=(250, 300)):
		drSingleChoiceDialog.__init__(self, parent, "Open Imported Module", modulelist, point, size)
		
		#Why is this needed?  Who knows.  But it is.
		self.Move(point)
		
		self.Bind(wx.EVT_CLOSE, self.OnCloseW)
		
		self.parent.LoadDialogSizeAndPosition(self, 'openimportedmoduledialog.sizeandposition.dat')
Exemplo n.º 4
0
    def __init__(self, parent, Document, matches, positions):
        drSingleChoiceDialog.__init__(self,
                                      parent,
                                      'Source Browser Go To',
                                      matches,
                                      False,
                                      SetSizer=False)

        self.Document = Document

        self.positions = positions

        self.txtLine = wx.TextCtrl(self,
                                   -1,
                                   '', (0, 0), (350, -1),
                                   style=wx.TE_READONLY)
        self.txtDefinedIn = wx.TextCtrl(self,
                                        -1,
                                        '', (0, 0), (350, -1),
                                        style=wx.TE_READONLY)

        self.lineSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.lineSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.lineSizer.Add(self.txtLine, 1, wx.EXPAND)
        self.lineSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)

        self.defSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.defSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.defSizer.Add(self.txtDefinedIn, 1, wx.EXPAND)
        self.defSizer.Add(wx.StaticText(self, -1, '  '), 0, wx.SHAPED)

        self.theSizer.Insert(2, wx.StaticText(self, -1, '  '), 0, wx.SHAPED)
        self.theSizer.Insert(3, self.lineSizer, 0, wx.EXPAND)
        self.theSizer.Insert(4, self.defSizer, 0, wx.EXPAND)

        self.SetSizerAndFit(self.theSizer)

        self.Bind(wx.EVT_LIST_ITEM_SELECTED,
                  self.OnSelected,
                  id=self.ID_CHOICES)

        self.OnSelected(None)
        if parent.PLATFORM_IS_GTK:  #does not get initially the focus (bug tracker #1903778, "Open Imported Module: focus problem", 29.02.2008: from Jon White, thanks.
            self.SetFocus()