Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected label behaviour #34

Open
lsdrfrx opened this issue Mar 6, 2023 · 0 comments
Open

Unexpected label behaviour #34

lsdrfrx opened this issue Mar 6, 2023 · 0 comments

Comments

@lsdrfrx
Copy link

lsdrfrx commented Mar 6, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant