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
    • Recent
    • Tags
    • Users
    • Login

    Alignment of buttons [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 504 Views
    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 Offline
      Helper
      last edited by

      On 04/01/2015 at 20:53, xxxxxxxx wrote:

      Hi,

      I have 4 bitmap buttons. I want them to be placed in 1 row in such a way that 3 button are in the middle of the row adjacent to each other and one button at the right hand corner of the row. How can I do that?

      Thanks
      Nishant

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

        On 05/01/2015 at 05:21, xxxxxxxx wrote:

        Hi Nishant,

        can you please clarify, in which context you are trying to do this. Are you trying this in a dialog or in a description? Is it resource file based or created dynamically?

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

          On 05/01/2015 at 20:26, xxxxxxxx wrote:

          Hi,

          I am developing a cinema 4d plugin in python. It is in the main panel and is resource file based and not created dynamically.

          PS - Can you tell me how i can post images in the forum so that the questions can be clearly understood .

          Thanks
          Nishant

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

            On 06/01/2015 at 00:57, xxxxxxxx wrote:

            Nishant,
            unfortunately images can not be simply uploaded. Instead they need to be accessible via URL and can then be inserted into the post via the respective button, if you use the "Post Reply" function instead of the "Quick Reply". I hope, this will change in future...

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

              On 06/01/2015 at 03:30, xxxxxxxx wrote:

              In a description resource file you can use layout group to create your button row.
              As far as I know, you don't have means to align a button to the right.
              But what you could do is to have a layout group with static text as empty placeholders.
              Like so:

              GROUP
              {
                LAYOUTGROUP; COLUMNS 3;
                
                GROUP { BITMAPBUTTON YOUR_BUTTON_ID_1 { FIT_H; BUTTON; ICONID1 300000255; } }
                GROUP { STATICTEXT { } }
                GROUP { BITMAPBUTTON YOUR_BUTTON_ID_2 { FIT_H; BUTTON; ICONID1 300000255; } }
              }
              

              While you may use the above as a workaround, I'm not sure, this is recommendable. The GUI layout may get unnaturally wide, user may dislike this. Instead I recommend to rethink the layout and if this is really needed.
              Maybe this is a good general advice for GUI design: Rather stick to simple designs and try to do it in a way, it's already done somewhere else in Cinema. Your plugin will integrate more harmoniously and won't stick out like an alien.

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

                On 06/01/2015 at 21:33, xxxxxxxx wrote:

                Thanks

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