Alignment of buttons [SOLVED]



  • 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



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



  • 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



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



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



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

    Thanks


Log in to reply