Gtk::Text is deprecated (apparently) so now how does this tutorial work?

A

Abe Vionas

Some great tutorials out there that are a bit difficult to learn from if these things keep getting deprecated. Ugh. Can anyone offer some guidance on what the current way to do the following is in Gtk2?

Regards, Abe


require 'Gtk2'
Gtk.init

window = Gtk::Window.new

vadj = Gtk::Adjustment.new(0,0,0,0,0,0)
text = Gtk::Text.new(nil, vadj)
vs = Gtk::VScrollbar.new(vadj)

text.set_editable true

hbox = Gtk::HBox.new(false, 0)
hbox.pack_start text, true, true, 0
hbox.pack_start vs, false, false, 0

window.add hbox
text.show
vs.show
hbox.show
window.show
Gtk.main
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top