T
T
tomthetugbout2021-10-31 17:03:59
Telegram
tomthetugbout, 2021-10-31 17:03:59

How to generate a row of 3 inline aiogram buttons?

Registered adding an inline button (product to the store through the button)

def btn_orders():
    keys = []
    for item in retrun_items():
        data = item[0]
        keys.append([InlineKeyboardButton(text=item[1], callback_data=f'order_{data}')])
    return InlineKeyboardMarkup(inline_keyboard=keys)


But everything is generated in 1 column and not 3, as I need, I already indicated the number through row, it is still generated in 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2022-02-10
@stead

return InlineKeyboardMarkup(inline_keyboard=keys, row_width = 3)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question