wxHtmlWindow

I've never tried it, but there is an OnLinkClicked() method that you should
be able to override.

It takes a wxHtmlLinkInfo as the lone parameter. You may want to consult
the docs on this.

The below code was stolen from the demo:

def OnLinkClicked(self, linkinfo):
        self.log.WriteText('OnLinkClicked: %s\n' % linkinfo.GetHref())

        # Virtuals in the base class have been renamed with base_ on the
front.
        self.base_OnLinkClicked(linkinfo)

jw

···

-----Original Message-----
From: Geiregat Jonas [mailto:eniac@sdf-eu.org]
Sent: Thursday, July 10, 2003 5:33 AM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] wxHtmlWindow

I'm using wxHtmlWindow , is it possible to, when a users
clicks a link,
he doesn't go to the page but does something else.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org

Hi all,

I have a "cosmetic" problem with 2.4.1.2. It is fairly minor, but it looks
messy in my application, and it worked ok in 2.4.0.2, so it would be nice if
I could fix it.

The attached program displays a simple grid linked to a GridTableBase. On
initial display, the top row has a height about 50% greater than the
standard row height. If there are enough rows to force a vertical scrollbar,
and you scroll down and then up again, the top row reverts to normal size.

It only goes wrong under specific conditions. You must use a GridTableBase,
you must use a sizer, you must append the rows after creating the
GridTableBase, and you must not give the grid an initial size. I found that
if I give the grid no size or a small size, it goes wrong, but if I increase
the size beyond a certain point, the problem goes away. The size is actually
irrelevant as the sizer determines the size, but it does affect this
situation.

Platform is Linux (Redhat 9), Python 2.2.3, and wxPython 2.4.1.2 compiled
for GTK2. My Windows machine is still running wxPython 2.4.0.2, so I cannot
say whether it is Linux specific or GTK2 specific.

Thanks in advance

Frank Millman

fm17.py (2.2 KB)

Frank Millman wrote:

Hi all,

I have a "cosmetic" problem with 2.4.1.2. It is fairly minor, but it looks
messy in my application, and it worked ok in 2.4.0.2, so it would be nice if
I could fix it.

The attached program displays a simple grid linked to a GridTableBase. On
initial display, the top row has a height about 50% greater than the
standard row height. If there are enough rows to force a vertical scrollbar,
and you scroll down and then up again, the top row reverts to normal size.

It only goes wrong under specific conditions. You must use a GridTableBase,
you must use a sizer, you must append the rows after creating the
GridTableBase, and you must not give the grid an initial size. I found that
if I give the grid no size or a small size, it goes wrong, but if I increase
the size beyond a certain point, the problem goes away. The size is actually
irrelevant as the sizer determines the size, but it does affect this
situation.

Platform is Linux (Redhat 9), Python 2.2.3, and wxPython 2.4.1.2 compiled
for GTK2. My Windows machine is still running wxPython 2.4.0.2, so I cannot
say whether it is Linux specific or GTK2 specific.

Looks like it is GTK2 specific, probably something is getting measured wrong when the window has no size... Please enter a bug report about it. In the meantime there shouldn't be anything wrong with your workaround.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!