Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:09:27+00:00 2026-05-26T11:09:27+00:00

Here is a demo sample of TCL code for iwidgets::scrolledtext . package require Iwidgets

  • 0

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.

  1. To make iwidgets::scrolledtext online, i.e. when iwidgets::scrolledtext is opened and when I add some lines to file at /path/to/some/file, I want the iwidgets::scrolledtext to be updated automatically.
  2. To make the text at iwidgets::scrolledtext static, i.e. to prevent the text from editing.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:09:27+00:00Added an answer on May 26, 2026 at 11:09 am

    Try this little subclass of the scrolledtext class:

    itcl::class TailScrolled {
        inherit iwidgets::Scrolledtext
        destructor {}
        public method import {filename}
        private variable fd
        private variable cb
        private method ReadAppend {}
    }
    
    itcl::body TailScrolled::destructor {} {
        if {[info exist fd]} {
            close $fd
            after cancel $cb
        }
    }
    itcl::body TailScrolled::import {filename} {
        if {[info exist fd]} {
            close $fd
            after cancel $cb
        }
        set fd [open $filename r]
        ReadAppend
    }
    itcl::body TailScrolled::ReadAppend {} {
        set cb [after 500 [::itcl::code ReadAppend]]
        insert end [read $fd]
    }
    

    (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.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a MathML sample code I am using to test MathML rendering. Demo
Why does this code (taken from the demo sample at jquery ui), doesn't work
I've noticed from here that the contents is only the header Revision 16532: /tags/3.3.2.SR1/samples/richfaces-demo/src/main/java/org/richfaces/demo/dataTableScroller
Here's a minimal batch file, demo.bat , to illustrate my problem: @ECHO off set
Here is my code, which takes two version identifiers in the form 1, 5,
the VMware is able to ping the gmail server. sample code MailMessage mail =
I tried the sample demo at Codility website, and posted my solution but I've
I have several divs for displaying demo boxes of graphics, and code boxes for
I'm facing a issue with opening mail client using openURL. Here is the code.
I have been trying to follow this example (download the source code from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.