Daniel
Daniel

Reputation: 4314

Gtk: GtkVPaned second child height

Is there any way to make GtkVPaned to set splitter position so second child would take 100px height?

Thanks.

Upvotes: 0

Views: 83

Answers (1)

Spudd86
Spudd86

Reputation: 3006

If you have a GtkVPaned and have already added your two widgets to it something like this should work:

GtkVPaned *vpane = ...;

// set up stuff here

int pos = ;// calculate correct position here, easy if you know the height already
g_object_set(vpane, 
            "position", pos,
            "position-set", TRUE); 

It gets harder if you don't know the height of the region, then you actually have to add the VPane to whatever you want it in, make sure layout happens then ask for the height.

Upvotes: 1

Related Questions