Dialog res questions
-
On 06/02/2017 at 01:39, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I'm trying to create a scrollable and scalable GeUserArea for a custom gui in a dialog.
The dialog will be a content browser-like window that shows previews of materials and models in different tabbed groups.Here is the res file for this dialog:
DIALOG BROWSER_DIALOG { NAME BROWSER_DIALOG_TITLE; SCALE_H; SCALE_V; FIT_H; FIT_V; GROUP { SCALE_H; SCALE_V; FIT_H; FIT_V; ALLOW_WEIGHTS; GROUP BROWSER_TABS_OBJECTS_GROUP { SCALE_H; SCALE_V; FIT_H; FIT_V; SIZE 300,500; TAB BROWSER_TAB_GROUP { SELECTION_TABS; SCALE_H; SCALE_V; GROUP BROWSER_MATERIAL_TREEVIEW_GROUP { NAME BROWSER_MATERIAL_TAB_NAME; TREEVIEW BROWSER_MATERIAL_TREEVIEW { SCALE_H; SCALE_V; NO_MULTISELECT; } } GROUP BROWSER_MODEL_TREEVIEW_GROUP{ NAME BROWSER_MODEL_TAB_NAME; TREEVIEW BROWSER_MODEL_TREEVIEW { SCALE_H; SCALE_V; NO_MULTISELECT; } } } } SCROLLGROUP { SCALE_H; SCALE_V; SIZE 1200,500; SCROLL_V; BROWSERCUSTOMGUI BROWSER_OBJECTS_GROUP { SIZE 1200, 600; //SCALE_H; SCALE_V; FIT_H; FIT_V; } } } }
-
First of all, I read in the manual that SIZE 100, 100 describes 1/10 number of characters.
Does Sized(LONG width, LONG height) in GeUserArea return pixels or characters ? -
I need to set the size of the GeUserArea based on the items shown. How can I do that with res files ?
As you can see above, I have set SIZE 1200, 600 to the custom gui, but in some cases I need more than that.
Thank you very much for your time.
-
-
On 07/02/2017 at 04:48, xxxxxxxx wrote:
Hi
- First of all, I read in the manual that SIZE 100, 100 describes 1/10 number of characters.
Does Sized(LONG width, LONG height) in GeUserArea return pixels or characters ?
Just as the docs state of Sized() state, the parameters are provide the new size in pixels.
- I need to set the size of the GeUserArea based on the items shown. How can I do that with res files ?
As you can see above, I have set SIZE 1200, 600 to the custom gui, but in some cases I need more than that.
That's not how Cinema's GUI works. While you can provide default sizes (which will also be used in case of fixed size widgets), it's not the programmer dictating any sizes. Instead it's the user providing a size (via resizing a dialog and/or docking it into her/his layout). Then you get informed about the new size via the Sized() function.
Take for example the Content Browser you mentioned. Switch it to large icons and resize the window. The Content Browser won't force a width of the display area onto the user. Quite the opposite, it will display as many columns of icons as it sees fit into the given width of the dialog.By the way, we thought of mis-using the GetMinSize() method of a GeUserArea to achieve what you want. But that's just called once and can't be used for this either.
- First of all, I read in the manual that SIZE 100, 100 describes 1/10 number of characters.