Hello, I'm writing a application where I have a textview inside a scrolledwindow. Is it possible to hide the vertical scrollbar? I tried scrolledwindow.set_policy(Gtk::POLICY_NEVER) but then my textview grows as the text grows. I want that my textview to behave like it there was a scrollbar, I just want it invisible (the user can go up and down in text with PageUp/Down). I also tried scrolledwindow.vscrollbar.hide, but that doesn't do nothing. Regards, André -- Lamentação sem gratidão é murmuração. (Howard Hendricks)
on 25.07.2008 15:27
on 26.07.2008 05:20
Hi, In <20080725102643.d9e6968d.andre.nho@gmail.com> "[ruby-gnome2-devel-en] Hiding a scroll bar" on Fri, 25 Jul 2008 10:26:43 -0300, André Wagner <andre.nho@gmail.com> wrote: > I'm writing a application where I have a textview inside a scrolledwindow. Is it possible to hide the vertical scrollbar? > > I tried scrolledwindow.set_policy(Gtk::POLICY_NEVER) but then my textview grows as the text grows. I want that my textview to behave like it there was a scrollbar, I just want it invisible (the user can go up and down in text with PageUp/Down). > > I also tried scrolledwindow.vscrollbar.hide, but that doesn't do nothing. Use GtkWeidget#set_size_request. scrolled_window = Gtk::ScrolledWindow.new # Ruby/GLib2 >= 0.17 scrolled_window.set_policy(:automatic, :never) # Ruby/GLib2 < 0.17 # scrolled_window.set_policy(Gtk::POLICY_AUTOMATIC, # Gtk::POLICY_NEVER) text_view = Gtk::TextView.new text_view.set_size_request(200, 300) scrolled_window.add(text_view) Thanks, -- kou
on 28.07.2008 13:23
Thank you very much for this info, this behavior was exactly what I was looking for! However... I need my text box to be resizeable. Is there any way I can get this behavior wihtout using set_size_request on the text box? Thank you in advance, André On Sat, 26 Jul 2008 12:20:05 +0900 (JST) Kouhei Sutou <kou@cozmixng.org> wrote: > > I also tried scrolledwindow.vscrollbar.hide, but that doesn't do nothing. > text_view = Gtk::TextView.new > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > ruby-gnome2-devel-en mailing list > ruby-gnome2-devel-en@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en -- Lamentação sem gratidão é murmuração. (Howard Hendricks)
on 02.08.2008 08:59
Hi,
In <20080728082307.bac1a068.andre.nho@gmail.com>
"Re: [ruby-gnome2-devel-en] Hiding a scroll bar" on Mon, 28 Jul 2008
08:23:07 -0300,
André Wagner <andre.nho@gmail.com> wrote:
> However... I need my text box to be resizeable. Is there any way I can get this behavior wihtout using set_size_request on the text box?
Is it good enough that resize top level window?
Could you show your example script?
Thanks,
--
kou
on 05.08.2008 12:34
> > However... I need my text box to be resizeable. Is there any way I can get this behavior wihtout using set_size_request on the text box? > > Is it good enough that resize top level window? Try to imagine a text editor such as Wordpad. If I use set_size_request in the main textview, I won't be able to resize my window by making it smaller. Am I right? André -- Lamentação sem gratidão é murmuração. (Howard Hendricks)
on 05.08.2008 13:59
Hi, In <20080805073421.1430fba0.andre.nho@gmail.com> "Re: [ruby-gnome2-devel-en] Hiding a scroll bar" on Tue, 5 Aug 2008 07:34:21 -0300, André Wagner <andre.nho@gmail.com> wrote: > > > However... I need my text box to be resizeable. Is there any way I can get this behavior wihtout using set_size_request on the text box? > > > > Is it good enough that resize top level window? > > Try to imagine a text editor such as Wordpad. If I use set_size_request in the main textview, I won't be able to resize my window by making it smaller. Am I right? What about text_view.set_size_request(0, 0)? Could you show an example script that reproduces the problem? Thanks, -- kou
on 05.08.2008 14:15
> > Try to imagine a text editor such as Wordpad. If I use set_size_request in the main textview, I won't be able to resize my window by making it smaller. Am I right? > > What about text_view.set_size_request(0, 0)? Oh, well, I just haven't thought of that :-) I only thought of something like text_view.set_size_request(400, 300). Thank you very much for your direction and patience! André -- Lamentação sem gratidão é murmuração. (Howard Hendricks)