473,626 Members | 3,467 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 1844
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
2480
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
1371
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
2560
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
1483
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
1847
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
4228
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
2858
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
1095
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
8268
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
8202
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
8707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8641
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
8366
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
7199
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...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2628
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1812
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.