-
Notifications
You must be signed in to change notification settings - Fork 0
Text.cs
DavidLandes edited this page Jan 14, 2022
·
3 revisions
- A simple text container.
// Create an empty text box.
Text textBox = new Text();
// Create a text box with content.
Text name = new Text("Bill Johnson");Text address = new Text();
// Add content to the text box.
address.SetText("123 Main st.");Text textBox = new Text();
// Report objects can get references to their child components through IDs
// Take care to ensure IDs are unique & not duplicates.
textBox.SetId("My Unique ID");- also see Report
Text textBox = new Text();
Text text2 = new Text();
// Set the width of the component to 90% of the parent component's width.
textBox.SetWidth(90, Measurement.Percent);
// Set the height of the component to 150 pixels.
textBox.SetHeight(150, Measurement.Px);
// Set the width of the component to 20em.
text2.SetWidth(90, Measurement.Em);
// Set the height of the component to 25pt.
text2.SetHeight(25, Measurement.Pt);