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
    • Login

    Keeping text and edit UI component horizontally

    Cinema 4D SDK
    3
    3
    544
    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.
    • N
      nicholas_yue
      last edited by m_adam

      Hi,

      I have difficulty keeping the label for a edit UI component on the same line with the following code. I want the FRAME_CHUNK_EDIT to the right of FRAME_CHUNK_LABEL

          def CreateLayout(self) :
              '''
              Frame Chunk size,
              Render folder prefix
              Frame range (start, end)
              '''
              self.GroupBegin(id=1013, flags=c4d.BFH_SCALEFIT, cols=1)
              #
              self.GroupBegin(id=1014, flags=c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, cols=1)
              self.AddStaticText(FRAME_CHUNK_LABEL, c4d.BFV_MASK, name="Frame Chunk size")
              self.AddEditNumberArrows(FRAME_CHUNK_EDIT, c4d.BFV_MASK, initw=100)
              self.GroupEnd()
              #
              self.AddButton(SUBMIT_BUTTON, c4d.BFV_MASK, initw=100, name="Submit")
              self.GroupEnd()
              return True
      

      Cheers

      1 Reply Last reply Reply Quote 1
      • ferdinandF
        ferdinand
        last edited by

        Hi,

        unless I am misunderstanding your intentions, you will simply need a two column layout in the respective layout group, i.e. change

        self.GroupBegin(id=1014, flags=c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, cols=1)
        

        to

        self.GroupBegin(id=1014, flags=c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, cols=2)
        

        Cheers,
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • M
          m_adam
          last edited by

          Hi @nicholas_yue I confirm the correct way is to define the number of columns you want in a group.

          Please next time, post on the correct forum see How to post a Question, to set up tags and be sure to set up your topic as q question(QA Functionality.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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