After I use Google Slide API to create slides for me, I see text box with text saying 'Click to add Text' , 'Click to add title', And same for 2 column sides, how can i set the text for the right 'Click to add Text', and same for the left.
How can I programmatically find out those text boxes and set the text I want?
Here is the code: I 1) create a slide and make it TITLE_AND_TWO_COLUMNS layout 2) create a Shape and 3) Insert Text to the Shape. But when I view the slide in google drive, i see 'Click to Add Text'
IList<Request> requests = new List<Request>();
String slideId = "MyNewSlide_001";
requests.Add(new Request()
{
CreateSlide = new CreateSlideRequest()
{
ObjectId = slideId,
InsertionIndex = 1,
SlideLayoutReference = new LayoutReference()
{
PredefinedLayout = "TITLE_AND_TWO_COLUMNS"
}
}
});
String textBoxId = "MyTextBox_01";
Dimension pt350 = new Dimension()
{
Magnitude = 350.0,
Unit = "PT",
};
requests.Add(new Request()
{
CreateShape = new CreateShapeRequest()
{
ObjectId = textBoxId,
ShapeType = "TEXT_BOX",
ElementProperties = new PageElementProperties()
{
PageObjectId = slideId,
Size = new Size()
{
Height = pt350,
Width = pt350
},
},
}
});
requests.Add(new Request()
{
UpdateShapeProperties = new UpdateShapePropertiesRequest()
{
ObjectId = textBoxId,
ShapeProperties = new ShapeProperties
{
ShapeBackgroundFill = new ShapeBackgroundFill
{
SolidFill = new SolidFill
{
Color = new OpaqueColor
{
ThemeColor = "HYPERLINK"
}
}
}
},
Fields = "shapeBackgroundFill.solidFill.color,outline"
},
});
// Insert text into the box, using the object ID given to it.
requests.Add(new Request()
{
InsertText = new InsertTextRequest()
{
ObjectId = textBoxId,
InsertionIndex = 0,
Text = "New Box Text Inserted"
}
});