On 31/01/2014 at 08:20, xxxxxxxx wrote:

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

(Also) in C++ I do not get the little arrow in front of the date and time to show (expand) the calendar and the clock?

	BaseContainer dtcont;
	dtcont.SetBool(DATETIME_TIME_CONTROL, true);	
	dtcont.SetBool(DATETIME_DATE_CONTROL, true);	
	dtcont.SetBool(DATETIME_NOW_BUTTON, true);	
    dt = (DateTimeControl* )AddCustomGui(1002, DATETIME_GUI,"Date/Time",BFH_SCALEFIT|BFV_SCALEFIT,0,0,dtcont); 

On 31/01/2014 at 11:25, xxxxxxxx wrote:

This is one of those odd gizmos that have to be expanded in the Init() function. Not in the CreateLayout() function.
That tripped me up too.

Bool MyDialog::InitValues(void)  
  dt->SetLayoutMode(LAYOUTMODE_MAXIMIZED);  //Works like "OPEN" does in the .res file  
  return TRUE;  

Be aware that most of the DT base container options are now depreciated.


On 01/02/2014 at 02:46, xxxxxxxx wrote:

Great, thank you.
Does it also means that we have to program the little collapse/expand arrow in front, ourselfs?
At the moment there is no such little arrow, so I assume you have to do it yourself.
Regards, Pim

On 01/02/2014 at 07:44, xxxxxxxx wrote:

Yeah. I think you'll have to create that effect yourself. Using a button that swaps an image when pressed. Or some other sort of trickery.
That little arrow only seems to get created when you use these custom gizmos in a Node based plugin. But not in a GeDialog plugin.

This is an example of creating the DT gizmo dynamically for a node (tag) plugin.
Just like when using the .res file to create the gizmo for these kinds of plugins. That little arrow automatically get created for us.
It's a built-in thing for the Node plugins that we get for free.

Bool SimpleTag::GetDDescription(GeListNode *node, Description *description,DESCFLAGS_DESC &flags)  
//We will load the DateTime GUI into the first description level(much like loading UD entries into levels)  
  DescID did = DescLevel(1, DTYPE_NONE, 0);  
  BaseContainer settings;  
  settings.SetLong(DESC_CUSTOMGUI, DATETIME_GUI);   
  settings.SetBool(DATETIME_NOW_BUTTON, TRUE);  
  if (!description->SetParameter(did,settings,DescLevel(ID_OBJECTPROPERTIES))) return FALSE;  
  return TRUE;  


On 01/02/2014 at 14:46, xxxxxxxx wrote:

Thanks, indeed when using User Data and a Date/Time field you get the little arrow.
But doing that yourself in c++ is not a big issue. We discussed it in one of my previous posts.
Thanks for the example.