Hi Frank sorry for the delay needed for this issue,
I get the time to look at it, and this is the thing I should have checked first, but either in a GeDialog with a Layout created in a script, I'm not able to hide a tab.
Since you said it was working previously, could you confirm you don't want to hide only the content (in your case the 3 StaticText) but also the tab in the tab entry, isn't? If yes could you provide a code sample because I would say even in a normal case I'm not able to reproduce.
import c4d
class Dlg(c4d.gui.GeDialog):
def CreateLayout(self):
if self.TabGroupBegin(10001, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, tabtype=c4d.TAB_TABS):
if self.GroupBegin(10010, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 0, title="First Tab"):
self.AddStaticText(10011, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, name="Text01")
self.GroupEnd()
if self.GroupBegin(10020, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 0, title="Second Tab"):
self.AddStaticText(10021, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, name="Text02")
self.GroupEnd()
self.GroupEnd()
self.AddButton(10030, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, name="Remove First Tab")
return True
def Command(self, id, msg):
if id == 10030:
print self.HideElement(10010, True)
print self.LayoutChanged(10001)
return True
def main():
global dlg
dlg = Dlg()
dlg.Open(c4d.DLG_TYPE_ASYNC)
# Execute main()
if __name__=='__main__':
main()
To me, the only way to remove a tab is to flush the complete group master of the TabGroup and re-add tabs except for the one you don't want.
Cheers,
Maxime.