Re: [gtkmm] Q: How to layout objects on a Notebook page
- From: Paul Davis <paul linuxaudiosystems com>
- To: "D. R. Evans" <N7DR arrisi com>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Q: How to layout objects on a Notebook page
- Date: Tue, 14 Oct 2003 16:34:20 -0400
>Just to give you an idea, though, the code is trivial:
>
> list<string> gl;
>
> gl.push_back("true");
> gl.push_back("false");
>
> _combo.set_popdown_strings(gl);
>
>//Restrict it to these choices only:
> _combo.set_value_in_list();
>
>The editable part of the combo is wide enough to hold the string
>"1234567890123456789012345", which is obviously far larger than necessary,
>and looks silly when the only possible values are "true" and "false".
>
>If I could set it to something like the width of "false " in the current
>font that would look much more reasonable.
AFAIK, its not simple. You need to do:
_combo.get_entry()->set_size_request (width, -1);
but to determine "width", you will to descend into the wonders of
PangoLayouts.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]