Adding to Edit Text Field
-
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. -
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.
-
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.