On 09/10/2017 at 03:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I have some problems with the dialog flags in resource file. No matter what I try, I cannot achieve what I want.
I need to create a content browser-like dialog. To do that, I need a tab group with tree views on the left of the dialog to navigate the contet and a Custom GUI on the right in which I will display the selected content data. I have defined the structure of the dialog in a Resource file. There are some components though that I add dynamically.
Here is the dialog resource. It has 2 tabs.
DIALOG BROWSER_DIALOG {
NAME BROWSER_DIALOG_TITLE;
SCALE_H; SCALE_V;
GROUP PARENT_GROUP {
SCALE_H; SCALE_V;
ALLOW_WEIGHTS;
TAB TAB_GROUP {
SELECTION_TABS;
SCALE_H; SCALE_V;
GROUP TAB_ONE_GROUP {
NAME TAB_ONE_NAME;
SCALE_H; SCALE_V;
}
GROUP TAB_TWO_GROUP{
NAME TAB_TWO_NAME;
SCALE_H; SCALE_V;
}
}
SCROLLGROUP SCROLL_GROUP {
SCALE_H; SCALE_V;
SIZE 1200,500;
SCROLL_V;
CONTENTCUSTOMGUI OBJECTS_GROUP {
}
}
}
}
Here is how I add the treeviews in tab groups.
BaseContainer temp_cont;
tree_view_gui = (TreeViewCustomGui* )AddCustomGui(tree_param_id, CUSTOMGUI_TREEVIEW, String(), BFH_LEFT | BFV_TOP | BFH_SCALE | BFV_SCALE, 500, 500, temp_cont);
-
The first problem is that even though I set BFH_SCALE, the tree view doesn't "fill" the group and it causes unecessary scroll bars to appear (even though there is still space available).
-
The other problem I have is in OBJECTS_GROUP where I want to show the selected content. This custom gui should have undefined size. It can either be huge or small, depending on the amount of data it contains.
If it's larger than the Dialog height, I want a vertical scroll bar to appear.
The problem is that to make the scrollbar appear, I have to pre-define its size to something bigger than dialog's height (e.g. SIZE 500, 1200).
It seems that I have to use AddCustomGui here with size depending on the content I want to show, right ?
I have checked the Layer Shader Browser because I need something similar to that, but I'm stuck to these 2 problems above.
Thank you for your time and sorry for the long post !