In my User Interface for the Google Calendar add-on, I’m attempting to remove the border from my buttons.
While I can create a border style, I’m unable to apply it to my buttons, as newTextButton
or newButtonSet
does not support borders, resulting in an error.
How can I eliminate the borders from my buttons?
// this is my border style varible for removing borders
const bor = CardService.newBorderStyle();
bor.setType(CardService.BorderType.NO_BORDER);
this is my button code
const back_button = CardService.newTextButton()
.setText("CHANGE_HOST_ID")
.setDisabled(false)
.setTextButtonStyle(CardService.TextButtonStyle.TEXT)
.setOnClickAction(back_action_fun);
var buttonSet = CardService.newButtonSet()
.addButton(back_button);
// button then added as a widget
const section = CardService.newCardSection().addWidget(buttonSet);
const card = CardService.newCardBuilder().addSection(section);
return card.build();
I tried these things but none of them worked?
// tried each of them individually
const back_button = CardService.newBorderStyle(bor).newTextButton().setText("CHANGE_HOST_ID")
const back_button = CardService.newBorderStyle().setType(CardService.BorderType.NO_BORDER).newTextButton().setText("CHANGE_HOST_ID")
const section = CardService.newCardSection().addWidget(buttonSet).newBorderStyle(bor);
const card = CardService.newCardBuilder().newBorderStyle(bor).addSection(section);```
You probably cannot the card service is very restrictive in that regard