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

    c4d.BFH_LEFT is not work in menu line?

    Cinema 4D SDK
    s24 python
    2
    3
    345
    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.
    • gheyretG
      gheyret
      last edited by

      Hello~
      I put a button in the menu bar and a want the button align to left.
      And i use c4d.BFH_LEFT, but the button is still align to right.
      Am I using it wrong?

      Snipaste_2021-09-14_11-29-21.jpg

      Here is my code:

      def CreateLayout(self):
          self.GroupBeginInMenuLine()
          self.GroupBegin(2000, c4d.BFH_LEFT, 0, 1, "", 0, 0, 0)
          self.AddButton(id=1000, flags=c4d.BFH_LEFT, name="Btn")
          self.GroupEnd()
          self.GroupEnd()
          return True
      

      www.boghma.com

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

        Hello @gheyret,

        thank you for reaching out to us. Please remember follow our forum guidelines when creating new postings, especially regarding tags.

        About your question: I am sorry to inform you that this is not possible, because it is not what the menu bar is intended for, since the menu will reside on the left side the menu bar of a dialog. The topic has been discussed in the past in the thread 'How to create a left-aligned group in the menu'. You can apply some 'hacks' like an invisible and scaling element to the right of all other elements, but this will not work in every scenario and is also not supported by us. My recommendation would be to stick with the interface conventions of Cinema 4D and not trying to circumvent them, as this will be a never-ending source of work with little reward.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        gheyretG 1 Reply Last reply Reply Quote 0
        • gheyretG
          gheyret @ferdinand
          last edited by

          @ferdinand Thanks to your replay, Some of the features I wanted seemed to be addressed in the R25!
          Let's rock and roll for R25!
          Cheers!

          www.boghma.com

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