winhelp(n)

NAME
winhelp - Tk extension for accessing Window HTML Help

SYNOPSIS
package require winhelp

winhelp pathName fileName ?fileName?

DESCRIPTION
Among other legacy formats, the Windows operating system provides a help system which is based on HTML. The HTML documents making up a help page collection are packaged and compressed into archives with the .CHM file name extension. A C API and a standalone executable exist to view and navigate these archives. The archives can be created with the Microsoft HTML Help Workshop.

This package provides a single Tcl command named winhelp which takes two or three arguments, 1. the path name of the toplevel window on whose behalf the HTML help window is to be popped up, 2. the file name of the .CHM HTML help archive, and optionally 3., the HTML file within that archive to be displayed. The third argument may contain a named anchor, e.g. foo.html#bar in order to jump to position bar within the document foo.html. Example:

package require winhelp foreach name {firstname lastname street city zip country phone fax} {
    frame .$name
    label .$name.l -text [string toupper $name] -width 10 -anchor e
    entry .$name.e -width 20
    bind .$name.e <F1> [list help $name]
    pack .$name.l .$name.e -side left
    pack .$name -side top -fill x } proc help {topic} {
    winhelp . sample.chm ${topic}.html }

For each entry widget a seperate HTML document is provided, e.g. firstname.html. The documents are packaged using the following HTML Help Workshop project file:

[OPTIONS] Compiled file=sample.chm Default Window=Default Default topic=.\default.html Display compile progress=No Language=0x0 [WINDOWS] Default="Sample",,,"default.html",,,,,,0x42120,,0x200c,[101,8,826,734],,0x4,,1,,,0 [FILES] .\default.html .\firstname.html .\lastname.html .\street.html .\city.html .\zip.html .\country.html .\phone.html .\fax.html

Alternatively, a single HTML document for the help text can be used and the topic selection can be done by named anchors within the document, e.g.

proc help {topic} {
    winhelp . sample.chm sample.html#$topic }

KEYWORDS
help, HTML

COPYRIGHT
Copyright (c) 2000-2021 chw at ch minus werner dot de