Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    programmatically add Groups to a Tab [SOLVED]

    SDK Help
    0
    3
    274
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 25/10/2015 at 21:07, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   16 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hello, I want to add new groups to a tab (see: SECOND_TAB). But I don't know, how to achieve that. I found "AddChildren" in the SDK but I don't know how to setup the container. Can someone help me please?

      dialog ressource:

        
      DIALOG DLG_MAINDIALOG {    
        
        TAB TAB{  
            GROUP FIRST_TAB {  
               ...  
            }  
        
        
            GROUP SECOND_TAB {  
               ...  
            }  
        }  
      }  
      

      code for the groups to add:

        
            for (Int32 i = 0; i < materialLinks.GetCount(); i++) {  
                GroupBegin(GROUP_ID12, BFH_SCALEFIT, 0, 0, "", BFV_GRIDGROUP_EQUALROWS);  
                    AddEditText (ETEX_UE4MAT+i, BFH_SCALEFIT, 0 , 0);  
                    AddEditText (ETEX_C4DMAT+i, BFH_SCALEFIT, 0 , 0);  
                    AddEditText (ETEX_LAYER+i, BFH_SCALEFIT, 0 , 0);  
                    AddEditText (ETEX_GROUP+i, BFH_SCALEFIT, 0 , 0);  
                GroupEnd();  
            }      
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 26/10/2015 at 05:52, xxxxxxxx wrote:

        Hello,

        it seems that it is not possible to add a group to an existing tab group. But you could store your tabgroup within a parent group. Then you could empty the parent group and add the tab group with all needed sub-groups dynamically. Something like this:

          
        LayoutFlushGroup(PARENTGROUP);  
          
        TabGroupBegin(1111, TAB_TABS);  
         GroupBegin(2222, BFH_FIT | BFV_FIT, 1, 1, "Tab Title", 0);  
         AddStaticText(3333, 0, 300, 20, "This is a static text", BORDER_THIN_IN);  
         GroupEnd();  
        GroupEnd();  
          
        LayoutChanged(PARENTGROUP);  
        

        best wishes,
        Sebastian

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 27/10/2015 at 10:56, xxxxxxxx wrote:

          Thank You Sebastian,

          this works very well. Cool solution! 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post