Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Login

    GeDialog with group columns

    SDK Help
    0
    4
    585
    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 15/06/2018 at 06:06, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R19 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      When using the code below in a GeDialog's CreateLayout I get the first 2 static text nicely in two columns. However, I would have expected this to apply to "child" groups as well.
      Unfortunately, the static text in these child groups end up on separate lines, resulting in:

      Left column                         Right column
      Left column (group)
      Right column(group)
      

      Is there a way to get groups next to each other?

              // separate the dialog into 2 columns  
            GroupBegin(0, BFH_SCALEFIT, 2, 0, String(), 0);  
            {  
                AddStaticText(0, BFH_LEFT | BFV_TOP, 100, 0, String("Left column"), 0);  
                AddStaticText(0, BFH_LEFT | BFV_TOP, 100, 0, String("Right column"), 0);  
        
                GroupBegin(0, BFH_SCALEFIT, 1, 0, String(), 0);  
                {  
                    AddStaticText(0, BFH_LEFT | BFV_TOP, 100, 0, String("Left column (group)"), 0);  
                    // ... some more  
                }  
        
                GroupBegin(0, BFH_SCALEFIT, 1, 0, String(), 0);  
                {  
                    AddStaticText(0, BFH_LEFT | BFV_TOP, 100, 0, String("Right column (group)"), 0);  
                    // ... some more  
                }  
            }  
            GroupEnd();  
      
      

      Thanks

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

        On 18/06/2018 at 09:12, xxxxxxxx wrote:

        Hi,

        I see your issue with nested groups. Unfortunately I need a bit more time to investigate.

        Strangely so, the GeDialog manual shows a code snippet demonstrating nested groups, which works as expected. But I haven't found the relevant difference to your snippet. As I said, I need a bit more time.

        For other readers entering this thread: It's good practice (though not related to the actual issue) to use different IDs for all widgets and groups (C4DS probably just simplified the posted example).

        Edit: Not my evening, yesterday. I accidentally called the widget IDs DescIDs, which they are NOT. Corrected.

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

          On 18/06/2018 at 11:29, xxxxxxxx wrote:

          Well, I have this bad habit of not assigning meaningful IDs to gadgets or groups that don't need interaction. So groups that are only used for layouting, or static text gadgets that are used for labeling only ... will all end up with "0" as DescID. As these don't actually need to be identified.

          Bad habit, I know.

          I need to join the anonymous anonymizers support group.

          On a more serious note.
          I looked once more at my code and found the obvious mistake. So obvious it's blasphemy, and I apologize for having you waste (again) time on trying to help me with this.
          I am using curly brackets in order to better visualize the grouping, but doing so I assumed having ended the group by closing the curly brackets. You see ... there are no GroupEnd();
          Just adding them makes it work, as expected.

          So sorry !!!

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

            On 18/06/2018 at 23:26, xxxxxxxx wrote:

            No worries, I guess I look pretty stupid here... I was so focused on GroupBegin() and the flags involved, I overlooked the missing GroupEnd() as well.

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