[wxPython] A bunch of questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] A bunch of questions

Pieter Claerhout-3
Hi guys,

I have some questions.

The first ones are about the wxHtmlWindow control.

1. Is there a way to prevent word wrapping in the
   wxHtmlWindow control. I tried to insert the
   <nobreak></nobreak> and <nobr></nobr> in the HTML,
   but that doesn't seem to work. Is there another
   way to prevent the word wrapping??
   
2. Is it possible to enable copying and selecting in
   the wxHtmlWindow control like you can in the
   wxTextCtrl (to copy stuff to the clipboard and so)?
   
3. I want to let the user click on a link in the HTML
   document to open a specified chm-help file on a
   specific topic. Does anyone has an idea on how to
   do that?
   
4. How can you get the destination of the link the user
   clicked on, so that you can use that to do something
   and without redirecting them to that link?
   
5. How do I use the OnLinkClicked method?

6. I used wxHtmlEasyPrinting to do the printing of the
   documents, but is it possible to disable the (annoying)
   message when you cancel out of the print dialog?
   
7.
   

I also have a remark about the wxFileDialog when you want
to save to a file. On windows, it is possible to specify
more than one filter, but when you select another filter,
the filename is not adapted to the new extension. Is this
a known issue or am I doing something wrong here?

Thanks in advance,


Pieter
[hidden email]

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] A bunch of questions

Robin Dunn
>
> 1. Is there a way to prevent word wrapping in the
>    wxHtmlWindow control. I tried to insert the
>    <nobreak></nobreak> and <nobr></nobr> in the HTML,
>    but that doesn't seem to work. Is there another
>    way to prevent the word wrapping??
>

wxHtmlWindow has a limited set of tags that it supports, and I don't think
these are on the list.  You might try the PRE tag instead.


> 2. Is it possible to enable copying and selecting in
>    the wxHtmlWindow control like you can in the
>    wxTextCtrl (to copy stuff to the clipboard and so)?
>

Not currently.


> 3. I want to let the user click on a link in the HTML
>    document to open a specified chm-help file on a
>    specific topic. Does anyone has an idea on how to
>    do that?
>

You can catch the click in OnLinkClicked (see below) but beyond that I
don'know.  I imagine that hh.exe has a COM interface you could use to drive
it.

I just realized that I didn't get the wxHelpController classes added for the
last release...  I'll try to get it done for the next.  They would probaly
let you do something like that if MS uses the same APIs for driving HtmlHelp
files as they do for WinHelp.


> 4. How can you get the destination of the link the user
>    clicked on, so that you can use that to do something
>    and without redirecting them to that link?
>

Implement OnLinkClicked


> 5. How do I use the OnLinkClicked method?
>

Derive a class from wxHtmlWindow and implement OnLinkClicked there.  It will
be called when a link is clicked.

> 6. I used wxHtmlEasyPrinting to do the printing of the
>    documents, but is it possible to disable the (annoying)
>    message when you cancel out of the print dialog?
>

Don't use wxHtmlEasyPrinting.  It is meant to be a simple convenience,
nothing more.  If you don't like the way it works you are free to use
wxHtmlPrintout however you want.


> 7.
>
>
> I also have a remark about the wxFileDialog when you want
> to save to a file. On windows, it is possible to specify
> more than one filter, but when you select another filter,
> the filename is not adapted to the new extension. Is this
> a known issue or am I doing something wrong here?

I've wondered about this myself.  I'm not sure what the "Right" behaviour is,
but you can use GetFilterIndex to find out which they selected and then add
the extension yourself.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users