简体   繁体   中英

I want to display the button vertically with microsoft teams

I am developing a bot to use with microsoftteams. I am using the button to display the answer options, but if I check with ios or Android it will be displayed side by side. Is there any way to display buttons vertically?

for(var i= 0; i< arrayList.length; i++ ){
  var val = arrayList[i].choice;
  buttons.push(builder.CardAction.imBack(session, val, val));
}                      
var card = new builder.HeroCard(session).buttons(buttons);
var msg = new builder.Message(session).addAttachment(card);
builder.Prompts.text(session, msg);

No, unfortunately right now you can't control the layout of the buttons on a card.

Do you mind adding this as a suggestion on UserVoice , with examples of why this level of control would be useful, so others can vote on your idea?

While unfortunately hero cards are bound to the layouts given by their respective channels/viewing devices (ie why you get different views on Teams vs iOS), adaptive cards will allow for greater formatting of layout. At this time however, adaptive cards are not available on Microsoft Teams.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM