Setting height of Gtk::TextView



Hi All,
  I'm playing around with an application where I have several
Gtk::TextView widgets in the same window. I'd like to be able to set
the height of these widgets. Specifically, what I'd like to do is
something like this:

  const int num_lines = buffer->get_line_count ();
  view.set_num_lines (std::max (num_lines, 10));

such that the height of the widget corresponds to the number of lines
in the buffer if it contains less than 10 lines, and if the buffer
contains more lines, the user has to scroll to see them.
Does that make any sense? Any ideas on how I can do this?

Thanks,
Søren


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]