Discussion:
Behavior of HTML Help window
(too old to reply)
Jerome Breitenbach
2009-06-07 17:40:21 UTC
Permalink
When I build and run on Windows XP the HTML Help sample of wxWidgets
2.8.9 located in
C:\wxMSW-2.8.9\samples\html\help\,
the appearance of the resulting help window does not match the options
stated for the wxHtmlHelpController constructor at
http://docs.wxwidgets.org/stable/wx_wxhtmlhelpcontroller.html.
Specifically, although the code in
C:\wxMSW-2.8.9\samples\html\help\help.cpp
constructs its wxHtmlHelpController object "help" using
help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES)
the appearance of the help window does not have the style described in
the wxWidgets documentation for the option
wxHF_ICONS_FOLDER,
which is subsumed in wxHF_DEFAULT_STYLE. Namely, the top-level nodes
"Test HELPFILE" and "Another book" in the help window should be
indicated with a book icon, whereas the secondary node "Book 2" under
"Another book" should have a folder icon; but, instead, *all* of the
nodes have the book icon.

Interestingly, using the exact same code on Linux with wxWidgets 2.8
produces the expected behavior: a folder icon for "Book 2". At first,
then, I thought that the WinXP operating system was somehow overriding
the wxWidgets application. This conjecture was bolstered by the
documentation of the alternative option
wxHF_ICONS_BOOK,
which states that the behavior I'm observing on WinXP "is how
Microsoft's HTML help viewer behaves." And, perhaps having Microsoft
HTML Help Workshop installed didn't help matters. However, the
wxWidgets application Audacity 1.2.6 is also installed on this computer,
yet its help window shows folder icons for secondary nodes even though
the Audacity source code (viz., src\Help.cpp) apparently does nothing
substantially different than the wxWidgets sample.

Can anyone explain to me why the wxWidgets sample doesn't show a folder
icon for its secondary node--and, how to make it so? (I'm betting that
the explanation will be pretty simple. :-) )

Jerome
Jerome Breitenbach
2009-06-09 14:34:17 UTC
Permalink
Having done some further poking around, I suspect that the reason for
the problem is that the file
c:/wxMSW-2.8.9/art/htmfoldr.xpm
does not contain the image of a folder, but rather the exact same book
image as in
c:/wxMSW-2.8.9/art/htmbook.xpm.
Is this a bug? (It wouldn't explain, though, why my Linux version of
the wxWidgets sample correctly shows a folder icon for the secondary
node. Could that be because I installed wxWidgets from the Ubuntu
repositories rather than compiling it myself from the latest source?)

Jerome

Continue reading on narkive:
Loading...