Answer the question
In order to leave comments, you need to log in
How to make buttons in a row?
I want to make such an arrangement of buttons: 1 row. Only not 6, but 8 buttons I
increase the text of the message "in breadth" As a result, the buttons themselves are stretched, but they are not placed in a row
Here is my code
def choise_number_message(self, message):
numbers, buttons = self.get_numbers()
markup = types.InlineKeyboardMarkup()
markup.add([types.InlineKeyboardButton(text=name, callback_data=name) for name in buttons])
text = 'Выбери номер телефона и нажми на его цифру быммимвлщиапицвафпафп пкуп йуапйукфпфпотарт:\n\n' + numbers
self.__bot.edit_message_text(text=text, chat_id=message.chat.id,
message_id=message.message_id,
parse_mode='HTML', reply_markup=markup)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question