On 19/12/2016 at 09:29, xxxxxxxx wrote:
Originally posted by xxxxxxxx
The size of tab pages groups is adapted to the size of its main TabGroup and not to their content.
Yep that is the problem, is there a workaround to fix it?
Here a code sample as you said there are extra space in the second tab I didn't want. Since in my script (not this one) I deal with 1 tab that can have 400/800 height px and another tab with only 10/20 px is really not visual pleasante to have a lot of extra space dat you can't avoid.
import c4d
class MyDialog(c4d.gui.GeDialog) :
dialog = None
def CreateLayout(self) :
if self.TabGroupBegin(id=1001, flags=c4d.BFH_LEFT, tabtype=c4d.TAB_TABS) :
if self.GroupBegin(id=1011, flags=c4d.BFH_FIT, cols=2, title="1st tab") :
self.element = self.AddStaticText(id=1005, flags=c4d.BFH_LEFT, initw=275, name="a", borderstyle=c4d.BORDER_NONE)
self.element = self.AddStaticText(id=1006, flags=c4d.BFH_LEFT, initw=275, name="b", borderstyle=c4d.BORDER_NONE)
self.element = self.AddStaticText(id=1007, flags=c4d.BFH_LEFT, initw=275, name="c", borderstyle=c4d.BORDER_NONE)
self.element = self.AddStaticText(id=1008, flags=c4d.BFH_LEFT, initw=275, name="d", borderstyle=c4d.BORDER_NONE)
self.element = self.AddStaticText(id=1009, flags=c4d.BFH_LEFT, initw=275, name="e", borderstyle=c4d.BORDER_NONE)
self.GroupEnd()
if self.GroupBegin(id=1021, flags=c4d.BFH_SCALE, cols=2, rows=4, title="2nd tab") :
self.element = self.AddStaticText(id=1010, flags=c4d.BFH_LEFT, initw=275, name="a", borderstyle=c4d.BORDER_NONE)
self.element = self.AddStaticText(id=1011, flags=c4d.BFH_LEFT, initw=275, name="b", borderstyle=c4d.BORDER_NONE)
self.GroupEnd()
self.GroupEnd()
return True
def main() :
a = MyDialog()
a.Open(c4d.DLG_TYPE_MODAL)
if __name__=='__main__':
main()