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

    Dialog elements based on the dlg size [SOLVED]

    SDK Help
    0
    3
    351
    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 30/01/2017 at 13:43, xxxxxxxx wrote:

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

      ---------
      Hello.

      Lets says I have 10 buttons in a dialog group.
      I need to add this buttons in 1 group in N rows based on the dialog size.
      The more you resize the dialog horizontally, the more buttons can be put in 1 row.

      For example, if the button has size 20,20 and the dialog horizontal size 100, 5 buttons will be placed in each row (2 rows total). If you resize the dialog to 500 horizontal size, all of the buttons will be placed automatically in 1 row.

      Can I do that somehow ? Is there any example ?

      Thank you for your time.

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

        On 31/01/2017 at 06:36, xxxxxxxx wrote:

        Hi Peterakos, thanks for writing us.

        With reference to your question, in order to guarantee a dynamically resizable UI it's recommended to use define the UI inside a GeUserArea which exposes the implementable Sized() method fired everytime the area changes in size. Snippets on this topic are available inside the GeUserArea Manual which could be pretty helpful to guide you to proper design a dynamic UI.

        Best, Riccardo

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

          On 31/01/2017 at 07:16, xxxxxxxx wrote:

          Thank you very much !
          I'll try it !

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