so, if I do understand your example correctly, you want to place your custom tab element gadget via
GroupBeginInMenuLine on the height of the menu, but at the same time have its content aligned to the left, i.e., the space which is normally occupied by the "normal" menu of a dialog.
When you look at the documentation of GroupBeginInMenuLine, you will see that it is built into the method to align its content to the right of the menu space. The only thing you could try to do is use
BFH_SCALEFIT flags to try to consume all the space from the right to the left. Which I tried for you and does not work. I also tried using a dummy element for pushing the content to the left, which works on a technical level, but effectively introduces so many other problems that it is not useable either (with a lot of dedication, one MIGHT be able to push that hack, but this is obviously not the intended use of the SDK and therefore out of scope of support).
So, in the end this is simply not possible, as it goes against the purpose of
GroupBeginInMenuLine of showing a smaller element on the right side of the menu, e.g., a search field. You will have to move your tab-interface into the regular layout of the dialog.
The code is used to look at the method:
self.SetTitle("Tabulated Menu Dialog")
documentNode = c4d.documents.GetFirstDocument()
commonFlag = c4d.BFH_LEFT | c4d.BFH_SCALEFIT
self.GroupBegin(1000, commonFlag , 0, 1, "", 0, 0, 0)
self.TabGroupBegin(1001, commonFlag, c4d.TAB_TABS)
ID_DYNMAIC, i = 2000, 0
documentName = documentNode.GetDocumentName()
firstObject = documentNode.GetFirstObject()
firstObjectName = firstObject.GetName() if firstObject else "None"
self.GroupBegin(ID_DYNMAIC + i, c4d.BFH_LEFT , 0, 1, documentName)
self.AddStaticText(ID_DYNMAIC + i + 1, c4d.BFH_LEFT, 0, 10,
documentNode = documentNode.GetNext()
ID_DYNMAIC += 2
# Will push stuff to the left
self.AddStaticText(ID_DYNMAIC + 1, commonFlag, 1000, 10, "Filler", c4d.BORDER_NONE)
myDialog = TabMenuDialog()
if __name__ == '__main__':