Skip to content

Column

Column

specified Grid with locked x cells. >w< - easter egg 2.

Specific kwargs

Argument Type Description
content {int | float: NevuObject} initial content.
row / y int | float number of rows.

Methods

Name Kwargs Description
add_item item: NevuObject, y: int | float adds item into specified row cell, starting from 1.
add_items content: dict adds multiple items from the specified dictionary.
kill_item_by_pos y: int | float removes and destroys the item at the specified row.
get_item y: int | float returns the item at the specified row, or None.

Column is a subclass of: Grid

Use case

from nevu_ui import *
import pygame

pygame.init()

window = Window((500, 500), title = "Column example")

menu = Menu(window, (100%vw, 100%vh))

layout = Column((100%vw, 100%vh), y = 3, content = {
    2: Label("Text", (250, 100))
})

menu.layout = layout
while True:
    window.begin_frame()
    window.update()
    menu.update()
    menu.draw()
    window.end_frame()
from nevu_ui import *
import pyray

window = Window((500, 500), title = "Column example", backend = Backend.RayLib)

menu = Menu(window, (100%vw, 100%vh))

layout = Column((100%vw, 100%vh), y = 3, content = {
    2: Label("Text", (250, 100))
})

menu.layout = layout
while True:
    window.begin_frame()
    window.update()
    menu.update()
    menu.draw()
    window.end_frame()

Created with GGen v1.3.0 for nevu_ui v0.8.2