Forum: Ruby Ruby/tk: Static text on a terminal window?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
907f29cb608004d2156d5ce88240f09b?d=identicon&s=25 Tim Mcd (zonbi)
on 2009-01-17 05:07
I haven't been able to find it, but is there a way to handle static text
and screen seperation with TK? On a basic terminal?
such as;

scrollingtexxt
scrollingtext
scrollingtext
--staticline--
place for 'gets'/user input
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2009-01-17 17:44
(Received via mailing list)
From: Tim Mcd <tmcdowell@gmail.com>
Subject: Ruby/tk: Static text on a terminal window?
Date: Sat, 17 Jan 2009 13:06:06 +0900
Message-ID: <206d5ada20131e062c6616499477b12c@ruby-forum.com>
> such as;
>
> scrollingtexxt
> scrollingtext
> scrollingtext
> --staticline--
> place for 'gets'/user input

Maybe, I don't understand what you want.
Did you say such like a following?
------------------------------------------------------------------------
require 'tk'

f = TkFrame.new.pack(:expand=>true, :fill=>:both)
e = TkEntry.new(f).pack(:side=>:bottom, :fill=>:x)
l = TkLabel.new(f, :anchor=>:w).pack(:side=>:bottom, :fill=>:x)
l.text '--- mode line ---'

t = TkText.new(f){
  yscrollbar(TkScrollbar.new(f).pack(:side=>:right, :fill=>:y,
  :expand=>false))
  pack(:side=>:left, :fill=>:both, :expand=>true)
}

e.bind('Return'){
  t.insert(:end, e.value + "\n").see(:end)
  e.delete(0, :end)
}

e.focus

Tk.mainloop
907f29cb608004d2156d5ce88240f09b?d=identicon&s=25 Tim Mcd (zonbi)
on 2009-01-18 04:57
Not what I was talking about, but awesome non the less. Thanks a bunch!
This topic is locked and can not be replied to.