wx.TextCtrl - can't insert text!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oriweis
    New Member
    • Jan 2013
    • 1

    wx.TextCtrl - can't insert text!

    Hi,

    I am using the python27, 64bit version. I have added textCtrl, trying to get the user input, but with no success..

    The text box is disabled. Please advice.
    My code:
    Code:
    self.nameTextCtrl = wx.TextCtrl(self)
    self.nameTextCtrl.Enable(True)
    self.nameTextCtrl.SetEditable(True)
    self.nameTextCtrl.SetDimensions(x=150, y=60, width=150, height=-1)
    Last edited by bvdet; Jan 11 '13, 02:54 PM. Reason: Use code tags <code/> around code, adjusted indentation
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Make sure you are passing the proper parent to the constructor.
    Code:
    panel = wx.Panel(self, -1)
    self.nameTextCtrl = wx.TextCtrl(panel)

    Comment

    Working...