Dialog elements based on the dlg size [SOLVED]

On 30/01/2017 at 13:43, xxxxxxxx wrote:

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


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.

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

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

Thank you very much !
I'll try it !