473,702 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
Jun 27 '08 #1
1 1849
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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2484
by: omission9 | last post by:
An application I have written is, suddenly it seems, throwing the following error after being left in use for several hours. This does not seem to occur with lighter usage. I am not 100% sure what causes this? Anyone have any advice? Seen it before? Traceback (most recent call last): File "PythonCardPrototype\binding.pyo", line 304, in _dispatch File "wxPython\events.pyo", line 23, in GetEventType wxPython.wxc.wxPyAssertionError: C++...
0
1375
by: plumpy321 | last post by:
Hi, I took an example from wxPython with the IE web browser and created a refresh button to automatically refresh a web page in 5 second intervals. But I notice that the memory utilization in Python keeps increasing over time. Can anyone tell me why this is happening? Here is my code: ============================================================================
1
2565
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have everything. The make install in $WXDIR seemed to go fine. I have the libxw* libraries in my lib/ directory libwx_base-2.5.so@ libwx_gtk_adv-2.5.so.3.0.0* libwx_base-2.5.so.3@ libwx_gtk_core-2.5.so@
0
1487
by: Stefanie Wagner | last post by:
Hello, I am fighting with EVT_KILL_FOCUS for quite a time now and I don't succeed at all. Situation: If a user leaves a textfield the entered information should be checked and an additional window should be opened to make a search possible to complete the entry. Basic solution:
12
1852
by: vivainio | last post by:
I rarely do GUIs, and reminded myself today why that is the case (simply, it's not fun). I implemented a simple TreeCtrl, and had to implement my own 'children' method, of all things! Here it is: def children(self,node): c =
0
998
by: gjzusenet | last post by:
Hi I've been using an IEHtmlWindow in my script with no problems, but it seems that for people with a clean installation of XP SP2 it fails like such: Traceback (most recent call last): File "htmlloader.py", line 509, in load File "PythonCard\model.pyo", line 340, in __init__ File "PythonCard\resource.pyo", line 86, in __init__
12
4233
Subsciber123
by: Subsciber123 | last post by:
I have a window that I have created using Python Card that contains an wx.iehtmlWindow opject inside of it. Does anyone know how to disable right click and/or cause links that would open in new windows to open in the same window? I am running Windows XP Home. I am running ActiveState Python 2.4. Anything that I have tried has done absolutely nothing, because I can't get the events from the wx.iehtmlWindow to filter them for right clicks.
5
2862
by: citronelu | last post by:
I made a small wxPython app that retrieves web data; for visual logging I use a TextCtrl widget, and stdout is redirected to it, something like this: class RedirectOutput: def __init__(self, objectTxtCtrl): self.out = objectTxtCtrl def write(self, string): self.out.WriteText(string)
0
1097
by: Robin Dunn | last post by:
Announcing ---------- The 2.8.8.1 release of wxPython is now available for download at http://wxpython.org/download.php. This is a minor bugfix release with several fixes for problems discovered in the 2.8.8.0 release. Source code is available, as well as binaries for Python 2.3, 2.4 and 2.5, for Windows and Mac, as well some packages for various Linux distributions. A summary of changes is listed below and also at
0
8738
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8652
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9086
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7829
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6575
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.