From: Ryan Tarpine Date: 2001-08-18T01:58:13+09:00 Subject: [ruby-talk:19953] Re: Ruby/Gtk, Text widget question Yuri Leikind wrote: > Hello all, > > Can anyone give me an example of using > Gtk::Text with Gtk::VScrollbar in Ruby/Gtk? Why don't you want to use Gtk::ScrolledWindow? Then, you only need scroll = Gtk::ScrolledWindow.new scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC) text = Gtk::Text.new.show scroll.add text Gtk::ScrolledWindow#set_policy takes args for the horizontal scrollbar and the vertical scrollbar, in that order. From GTK docs: "The policy determines when the scrollbar should appear...If GTK_POLICY_ALWAYS, the scrollbar is always present; if GTK_POLICY_NEVER, the scrollbar is never present; if GTK_POLICY_AUTOMATIC, the scrollbar is present only if needed" -- Ryan Tarpine, rtarpine@hotmail.com "Technology is a queer thing. It brings you great gifts in one hand, and it stabs you in the back with the other." -- C.P. Snow