Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GTK : How to set the Height of a VBox?

Tags:

c++

linux

gtk

gtkmm

Hi I'm making an app using GTKMM. The screenshot is below:

Screenshot

The Problem is, I'm not able to position the "My Label" to align at the top, just below the Search box.

I'm packing Name,Search box, Search Button into a HBox, which is packed into a VBox, and then MyLabel is packed into the VBox.

I think the problem is that the VBox is assigning equal heights to the two rows, So even though I align MYLabel to the top, but it's top is the middle of the screen 'cuz VBox distributed the heights between the two rows equally.

Is there a way to set the Heights of the VBox rows?? or any other way out?

like image 450
ace Avatar asked Nov 14 '25 18:11

ace


1 Answers

Set the "expand" and "fill" properties of the label to false.

like image 101
ptomato Avatar answered Nov 17 '25 10:11

ptomato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!