wxHtmlWindow: no underscore links?

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?

···

--
Qiangning

I've asked this once before, and the belief was that it couldn't be
done. I was instructed to post to the wxWidgets mailing list with the
same question, but I never got around to it.

jw

···

On 7/3/05, Qiangning Hong <hongqn@gmail.com> wrote:

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?

--
Qiangning

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

Jaime Wyant wrote:

I've asked this once before, and the belief was that it couldn't be
done. I was instructed to post to the wxWidgets mailing list with the
same question, but I never got around to it.

jw

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?

Then, I'll go to another way: can I catch the mouse click of a piece of
text in a html window? e.g.:

<h2>This piece of text is clickable.</h2>
<h3>These words are normal.</h3>

I want to perform some action when user click the h2-tagged text. I am
reading the document of wxHtmlCell, but it seems the click event is only
available for a single word, not the whole sentence. Maybe some python
coding will do the trick, however, am I reinventing the weel?

···

On 7/3/05, Qiangning Hong <hongqn@gmail.com> wrote:

--
Qiangning

Qiangning Hong wrote:

Jaime Wyant wrote:

I've asked this once before, and the belief was that it couldn't be
done. I was instructed to post to the wxWidgets mailing list with the
same question, but I never got around to it.

jw

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?
     
Then, I'll go to another way: can I catch the mouse click of a piece of
text in a html window? e.g.:

<h2>This piece of text is clickable.</h2>
<h3>These words are normal.</h3>

I want to perform some action when user click the h2-tagged text. I am
reading the document of wxHtmlCell, but it seems the click event is only
available for a single word, not the whole sentence. Maybe some python
coding will do the trick, however, am I reinventing the weel?

You can get rid of the underscores on a link using CSS (Cascading Style Sheets). Here is some sample code that does it:

<html>
<head>
<style>
.specialAnchor {
    text-decoration: none;
    color: red;
    }
</style>
</head>
<body>
    <a href="javascript:alert('normal')" >This is a normal link</a><br>
    <a href="javascript:alert('special')" class="specialAnchor>This is an anchor with no underline</a>
</body>
</html>

Here is a link to some CSS tips: http://www.websitetips.com/css/

--Matt

···

On 7/3/05, Qiangning Hong <hongqn@gmail.com> wrote:

Matt Fryer wrote:

Qiangning Hong wrote:

Jaime Wyant wrote:

I've asked this once before, and the belief was that it couldn't be
done. I was instructed to post to the wxWidgets mailing list with the
same question, but I never got around to it.

jw

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?
    
Then, I'll go to another way: can I catch the mouse click of a piece of
text in a html window? e.g.:

<h2>This piece of text is clickable.</h2>
<h3>These words are normal.</h3>

I want to perform some action when user click the h2-tagged text. I am
reading the document of wxHtmlCell, but it seems the click event is only
available for a single word, not the whole sentence. Maybe some python
coding will do the trick, however, am I reinventing the weel?

You can get rid of the underscores on a link using CSS (Cascading Style Sheets). Here is some sample code that does it:

<html>
<head>
<style>
.specialAnchor {
   text-decoration: none;
   color: red;
   }
</style>
</head>
<body>
   <a href="javascript:alert('normal')" >This is a normal link</a><br>
   <a href="javascript:alert('special')" class="specialAnchor>This is an anchor with no underline</a>
</body>
</html>

Here is a link to some CSS tips: http://www.websitetips.com/css/

--Matt

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

Actually, that won't work in the HTMLWindow--I was thinking of the Internet Explorer control. Sorry.

--Matt

···

On 7/3/05, Qiangning Hong <hongqn@gmail.com> wrote:

Matt Fryer wrote:

Matt Fryer wrote:

Qiangning Hong wrote:

[...]

How to display a link in a wxHtmlWindow without a underline? and
further, is it possible to control the link color?

Then, I'll go to another way: can I catch the mouse click of a piece of
text in a html window? e.g.:

<h2>This piece of text is clickable.</h2>
<h3>These words are normal.</h3>

I want to perform some action when user click the h2-tagged text. I am
reading the document of wxHtmlCell, but it seems the click event is only
available for a single word, not the whole sentence. Maybe some python
coding will do the trick, however, am I reinventing the weel?

You can get rid of the underscores on a link using CSS (Cascading
Style Sheets). Here is some sample code that does it:

<html>
<head>
<style>
.specialAnchor {
   text-decoration: none;
   color: red;
   }
</style>
</head>
<body>
   <a href="javascript:alert('normal')" >This is a normal link</a><br>
   <a href="javascript:alert('special')" class="specialAnchor>This is
an anchor with no underline</a>
</body>
</html>

Here is a link to some CSS tips: http://www.websitetips.com/css/

Actually, that won't work in the HTMLWindow--I was thinking of the
Internet Explorer control. Sorry.

If IE control can emit link-click events to my wxFrame to let me fully
control the action in python code (not javascript), it is also
acceptable. However, I find nothing about this kind of events except
the titlechange, statuschanged, etc, which are useless to my app.

my app is a desktop appliction, using html as user interface (for sizers
can not handle my problem, see my previous post at
http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:msp:40690:oifolldbpjnelamnpjik),
not for browse web pages.

···

--
Qiangning