Here is a demo sample of TCL code for iwidgets::scrolledtext.
package require Iwidgets
iwidgets::scrolledtext .st \
-labeltext "Scrolledtext Example" \
-visibleitems 70x20 \
-textfont {Courier 10} \
-textbackground black \
-vscrollmode dynamic \
-hscrollmode dynamic \
-wrap none
pack .st -fill both -expand true
.st component text configure -foreground green
.st import /path/to/some/file
I need the following additional options.
- To make
iwidgets::scrolledtextonline, i.e. wheniwidgets::scrolledtextis opened and when I add some lines to file at/path/to/some/file, I want theiwidgets::scrolledtextto be updated automatically. - To make the text at
iwidgets::scrolledtextstatic, i.e. to prevent the text from editing.
Try this little subclass of the scrolledtext class:
(Warning: I’ve not actually tried it, so I might’ve fluffed exactly how to do inheritance from an IWidgets widget. This is the principle of how to do it though.)