Skip to content

Unexpected label behaviour #34

@lsdrfrx

Description

@lsdrfrx

I added some labels into the window, but text is hidden or something.

local ltui        = require("ltui")
local application = ltui.application
local event       = ltui.event
local rect        = ltui.rect
local window      = ltui.window
local conf        = ltui.menuconf
local view        = ltui.view
local label       = ltui.label

local app         = application()

function app:init()
    application.init(self, "demo")
    local containers = { "container1", "container2", "container3", "container4" }
    local container_window = window:new("window.container", rect { 1, 1, 50, 10 }, "containers", false)
    for i = 1, 4, 1 do
        container_window:insert(label:new(containers[i], rect { 2, 1 + i, 15, 2 + i }, containers[i]):textattr_set("red"))
    end

    self:insert(container_window)
end

app:run()

Here's what it looks like:
image
What i'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions