pythonpython-3.xnicegui

How to create nicegui table in sideways manner?


I want to have a nicegui table in sideways (3x3) like below

3x3 table

I am using this code but it is not giving as expected

from nicegui import ui

test_settings = {
    "Load duration": "5 min",
    "Requested by": "eldsinghaitenant",
    "Run source": "Team Services portal",
    "Start time": "3/16/2016 10:54:15 AM",
    "Test target": "-",
    "Warmup duration": "-",
    "End time": "3/16/2016 10:59:18 AM",
    "Location": "South Central US",
    "Agent cores": "1",
}

with ui.grid(columns=3).classes('w-full'):
    for key, value in test_settings.items():
        ui.label(key).classes('font-bold')
        ui.label(value)

ui.run()

code output


Solution

  • I think you just need to switch columns=3 to columns=6:

    Screenshot