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
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
From: Tim M. [email protected]
Subject: Ruby/tk: Static text on a terminal window?
Date: Sat, 17 Jan 2009 13:06:06 +0900
Message-ID: [email protected]
such as;
scrollingtexxt
scrollingtext
scrollingtext
–staticline–
place for ‘gets’/user input
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
Not what I was talking about, but awesome non the less. Thanks a bunch!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs