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

    Adding to Edit Text Field

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 309 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 14/05/2012 at 06:53, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hi All,
       
      is it possible to add a string/text to a multi-line edit text field as you go? I have the following in the Command() of a dialog and is setting text in the dialog's text field.

      case (DLG_BTN_PRINT) :  
      {  
      if((obj = doc->GetActiveObject()) == FALSE){break;}  
      String Name = obj->GetName();  
      this->SetString(DLG_MULTILINEDIT, Name, FALSE, NULL);
      String Self = String(" is a polygon object.");  
      this->SetString(DLG_MULTILINEDIT, Self, FALSE, NULL);  
      }  
      break;
      

      But the second SetString() erases the first one - hence my query - how can I continue to add strings to the field as I go? And how do I add a new line?
       
      Thanks,
       
      WP.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 14/05/2012 at 13:59, xxxxxxxx wrote:

        Get the string from the edit box, add your new string to it, and set it back into the box.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 14/05/2012 at 18:21, xxxxxxxx wrote:

          Thanks Steve,
           
          I hadn't thought of that. Simple. And it works. Thanks.
           
          For anyone else, adding a new line is done via "\r\n" - added into the string.
           
          EDIT - correction to new line snippet.
           
          WP.

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