Re: Why does this behave the way it does?
- From: Robert Pearce <rob bdt-home demon co uk>
- To: gtkmm-list gnome org
- Subject: Re: Why does this behave the way it does?
- Date: Tue, 28 Feb 2012 18:29:35 +0000
Hi Doc,
On Tue, 28 Feb 2012 08:54:06 -0700 you wrote:
>
> >
> > The second issue is the size of the window. That's sort of related, because the
>
> Yes, I thought it was probably related to the first issue. Taking things
> one step at a time, once we've got the table so that it doesn't change size
> when adding the second textview, I'll see if the window-size issue still
> exists.
I've not looked at the internals of Gtk::Table for a while, but...
You have defined a table of 80x25 homogeneous cells in a fixed size
window. You then populate some of the cells. Now GTK calculates the
table size by first asking how big it wants to be, then setting it to
the window size if possible. The size request on a table proceeds to
ask all contained widgets how big they want to be. It then works out
the cell sizes from which to answer the question about its size. IF
configured for homogeneous, this algorithm is to establish the largest
single cell size and multiply by the number of cells, in each
dimension. You haven't populated any single cells. If you're lucky, GTK
will figure out that the largest single cell width is one fifth of your
five-cell-wide text entry. Then it works out the total table size.
Now just suppose this total table size is bigger than the fixed window
size. What does GTK do then? It can't satisfy all your stipulations. It
MUST violate one of them. It would seem reasonable to violate the
homogeneity.
So you can't "take things one step at a time" because the second step
may actually be causing the first!
HTH,
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]