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

    DATETIME_GUI

    SDK Help
    0
    5
    443
    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 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); 
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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;  
        }
        

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

        -ScottA

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

          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

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

            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.SetString(DESC_NAME,"DateTime");  
              settings.SetString(DESC_SHORT_NAME,"DateTime");   
              settings.SetBool(DATETIME_NOW_BUTTON, TRUE);  
              if (!description->SetParameter(did,settings,DescLevel(ID_OBJECTPROPERTIES))) return FALSE;  
              
              
              flags |= DESCFLAGS_DESC_LOADED;  
              return TRUE;  
            }
            

            -ScottA

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

              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.

              Pim

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