Re: Widgets size



Murray Cumming wrote:
I think you want to use get_allocation().

Hi Murray,

Thanks for your answer.
I tried your solution, but the code

Gtk::Allocation notebook_allocation = get_allocation ();
std::cout << "width: " << notebook_allocation.get_width () << std::endl;
std::cout << "height: " << notebook_allocation.get_height () << std::endl;

Outputs size 1 for width and height.

What am I doing wrong?

Thanks in advance
Pedro Sousa




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