![]() |
ActiveTcl User Guide
|
![]() |
iwidgets::scrolledhtml - Create and manipulate a scrolled text
widget with the capability of displaying HTML formatted docu-
ments.
iwidgets::scrolledhtml pathName
?options?
itk::Widget <- iwidgets::Labeledwidget <-
iwidgets::Scrolledtext <- iwidgets::Scrolledhtml
activeBackground background borderWidth cursor exportSelection foreground highlightColor highlightThickness insertBackground insertBorderWidth insertOffTime insertOnTime insertWidth padX padY relief
options.
activeRelief elementBorderWidth jumptroughColor
associated options.
spacing1 spacing2 spacing3 state
ciated options.
labelBitmap labelFont labelImage labelMargin
inherited options.
sticky
inherited options.
status. The command is executed in the form command
<number of characters
remaining>
ter text (such as <pre>...</pre> or <tt>...</tt>.) The size, style, and other font attributes are determined by the format tags in the document. The default is courier.
acter spaced text. The size, style, and other font attributes
are determined by the format tags in the document. The default is
times.
medium, large, or huge. The default is medium.
the forms acceptable to Tk_GetColor. This value may be
overridden in a particular document by the text attribute of
the Body HTML tag.
forms acceptable to Tk_GetColor. This value may be overridden in a particular document by the link attribute of the Body HTML tag.
text link. Execution is of the form linkcommand href, where href is the value given in the href attribute of the A HTML tag.
the link in any of the forms acceptable to Tk_GetColor.
The default is red.
forms acceptable to Tk_GetColor. This value may be
overridden in a particular document by the bgcolor attribute
of the Body HTML tag.
ified in the html document cannot be loaded.
rendering.
_________________________________________________________________
with the additional capability to display html formatted docu- ments. An import method is provided to read an html document file, and a render method is provided to display a html formatted text string.
whose name is pathName. This command may be used to invoke vari- ous operations on the widget. It has the following general form:
pathName option ?arg arg ...?
methods.
pathName cget option
option. Option may have any of the values accepted
by the iwid- gets::scrolledhtml command.
pathName configure ?option? ?value
option value ...?
option is specified, returns a list describing all of the
avail- able options for pathName (see
Tk_ConfigureInfo for information on the format of this
list). If option is specified with no value, then the
command returns a list describing the one named option (this list
will be identical to the corresponding sublist of the value
returned if no option is specified). If one or more
option-value pairs are specified, then the command modifies
the given widget option(s) to have the given value(s); in this case
the command returns an empty string. Option may have any of
the values accepted by the iwidgets::scrolledhtml command.
pathName import ?option? href
option is -link, href is assumed to be relative to
the applica- tion's current working directory. Otherwise,
href is assumed to be relative to the path of the last page
loaded. Href is either a filename, or a reference of the
form filename#anchorname. In the latter form,
fIFilename and/or anchorname may be empty. If file-
name is empty, the current document is assumed. If
anchorname is empty, the top of the document is assumed.
pathName pwd
directory of the last page loaded.
pathName render htmltext ?wd?
use for all links and images in the document. Wd defaults
to the application's current working directory.
pathName title
<title>...</title> field in the document.
tions:
ported.
ported by the text widget.
ported.
tions of the text widget
package require Iwidgets 4.0
option add *textBackground white
iwidgets::scrolledhtml .sh -fontname helvetica -linkcommand «this import -link"
pack .sh -padx 10 -pady 10 -fill both -expand yes
.sh import ~/public_html/index.html
<table border width="100%">
<tr><td>cell1</td><td align=right
rowspan=2>cell2</td></tr> <tr><td
colspan=2>cell3 w/ overlap</td>
</table> It hasn't been fixed because 1) it's a pain to fix,
2) it will slow tables down by a significant amount, and 3)
netscape has the same bug, as of V3.01.
inspect. Tkhtml is copyright 1995 Lawrence Berkeley Laboratory.
scrolledhtml, html, text, widget