Skip to content Skip to sidebar Skip to footer

Resizing Telegram Inline Keyboard

Telegram's inline keyboard is a great feature with lots of different use cases. Inline buttons are added as a list of items like this: inline_keyboard = [[InlineKeyboardButton(text

Solution 1:

You can adjust the width of the buttons by changing the quantity of them in one line.enter image description here

$inline_keyboard = array('inline_keyboard' =>
        array(
            array(
                array(
                    'text' => "\xF0\x9F\x93\x9D Заказы", 'callback_data' => '/orders'
                ),
                array(
                    'text' => "\xF0\x9F\x93\x8A Статистика", 'callback_data' => '/stats'
                ),
                array(
                    'text' => "\xF0\x9F\x92\xB0 Баланс", 'callback_data' => '/balance'
                )
            ),
            array(
                array(
                    'text' => "\xF0\x9F\x92\xB0 Баланс", 'callback_data' => '/balance'
                ),
                array(
                    'text' => "\xF0\x9F\x93\x8B Счета", 'callback_data' => '/bills'
                )
            ),
            array(
                array(
                    'text' => "\xF0\x9F\x93\x9D Заказы", 'callback_data' => '/orders'
                )
            ),
        ),
    );

Solution 2:


Post a Comment for "Resizing Telegram Inline Keyboard"