Sets the text content of the object.

Namespace:  DYMO.Label.Framework
Assembly:  DYMO.Label.Framework (in DYMO.Label.Framework.dll) Version: 1.0.0.0 (8.4.0.1475)

Syntax

C#
public void SetObjectText(
	string objectName,
	string text
)
Visual Basic (Declaration)
Public Sub SetObjectText ( _
	objectName As String, _
	text As String _
)
Visual C++
public:
virtual void SetObjectText(
	String^ objectName, 
	String^ text
) sealed

Parameters

objectName
Type: System..::.String
Object name to set text to.
text
Type: System..::.String
Text to set.

Implements

ILabel..::.SetObjectText(String, String)

Remarks

Given an object name and some text, changes the text of the object to have the new text. This method can only set plain text without any formatting. To set formatted/styled text, create LabelSetBuilder and then use AddStyledText or AddTextMarkup.

Examples

CopyC#
void SetObjectTextAndPrint()
{
    // obtain a reference to ILabel by loading a label from a file
    ILabel label = Label.Open("MyLabel.label");

    // set text
    label.SetObjectText("TEXT", "Some text");

    // print label
    label.Print("DYMO LabelWriter 450 Turbo");
}

See Also