wxpython and IEHtmlWindow, Focus Problem.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Farsheed Ashouri

    wxpython and IEHtmlWindow, Focus Problem.

    Hi everyone. I create a little browser with wxpython and IEHtmlWindow.
    But I have a little problem here.
    When I press enter in the html page, The focus goes to another panel.
    Why this happens?
    I want to load a html page and it have textares and user should able
    to press enter inside html page.

    This is the code for creating it:

    #============== =====Code Begin =============== ===========
    class PageOne(wx.Pane l):
    def __init__(self, parent):
    wx.Panel.__init __(
    self, parent, -1,
    style=wx.TAB_TR AVERSAL|wx.CLIP _CHILDREN|
    wx.NO_FULL_REPA INT_ON_RESIZE
    )

    self.sizer = wx.BoxSizer(wx. HORIZONTAL)
    import wx.lib.iewin as iewin
    a = iewin.IEHtmlWin dow(self, -1 )
    #a.LoadUrl('fil e:///E:/Ducuments/EL%20Software%2 0Project/
    mainSoft/xmlParser/HTML/learn/less2.html')
    self.sizer.Add( a, 3, wx.EXPAND,1)
    self.SetSizer(s elf.sizer)
    #self.Bind(wx.E VT_TEXT_ENTER , self.OnKeyPress , a)
    config.CurrentN otebook = a

    #============== =====Code End============ ==============

    Thanks in advance.
  • Mike Driscoll

    #2
    Re: wxpython and IEHtmlWindow, Focus Problem.

    On Apr 24, 11:48 pm, Farsheed Ashouri <rodmena....@gm ail.comwrote:
    Hi everyone. I create a little browser with wxpython and IEHtmlWindow.
    But I have a little problem here.
    When I press enter in the html page, The focus goes to another panel.
    Why this happens?
    I want to load a html page and it have textares  and user should able
    to press enter inside html page.
    >
    This is the code for creating it:
    >
    #============== =====Code Begin =============== ===========
    class PageOne(wx.Pane l):
        def __init__(self, parent):
            wx.Panel.__init __(
                self, parent, -1,
                style=wx.TAB_TR AVERSAL|wx.CLIP _CHILDREN|
    wx.NO_FULL_REPA INT_ON_RESIZE
            )
    >
            self.sizer = wx.BoxSizer(wx. HORIZONTAL)
            import  wx.lib.iewin    as  iewin
            a  = iewin.IEHtmlWin dow(self, -1 )
            #a.LoadUrl('fil e:///E:/Ducuments/EL%20Software%2 0Project/
    mainSoft/xmlParser/HTML/learn/less2.html')
            self.sizer.Add( a, 3, wx.EXPAND,1)
            self.SetSizer(s elf.sizer)
            #self.Bind(wx.E VT_TEXT_ENTER , self.OnKeyPress , a)
            config.CurrentN otebook = a
    >
    #============== =====Code End============ ==============
    >
    Thanks in advance.
    I recommend re-posting to the wxPython user's group: http://wxpython.org/maillist.php

    It may be that you need to set the focus on the html widget and within
    the widget, set the focus in one of your text areas. But I don't
    really know for sure.

    Mike

    Comment

    Working...