Jump to content

Label height limited by screen height


BabY

Recommended Posts

If I use this dummy code for example,

    testLabel = guiCreateLabel(0, 0, 5000, 5000, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50", false)

addCommandHandler("sl", function() -- scroll label
    guiSetProperty(testLabel, "AbsoluteYPosition", guiGetProperty(testLabel, "AbsoluteYPosition") - 20)
end)

addCommandHandler("add", function()
    local text = guiGetText(testLabel)
    text = text .. "\nHello world!"
    guiSetText(testLabel, text)
end)

I cannot add more lines after the line that 'fills' my screen height perfectly. Even if I scroll the label using /sl

 

Any ideas? I tried the properties:

- ClippedByParent

- The Unified family

- VertExtent

- Margin

 

 

It doesn't seem to cause errors when the text is added, because if I move the label down on the Y axis, and scroll it up again the text is still there. Seems like it's a default limitation. I have reasons to use a label instead of a ReadOnly Edit.

Link to comment
8 hours ago, NeXuS™ said:

Did you try using the guiSetPosition function?

My problem isn't positioning the label, my problem is housing it with more-than-what-my-screen-height-can-house lines. I tried a bunch of methods to move the label around, but this doesn't affect the said limit sadly.

And I need to use a label instead of dxText because I'm dealing with CEGUI, and the main theme of my script is CEGUI because I heavily use GUI functions.

Link to comment

Thanks, been working on it lately, while I'm highly active on the forum after my break because of an motorcycle accident. GLHF, and just keep motivated, feel free to rage on anything which should work but doesn't. :D

Edited by NeXuS™
Link to comment
9 hours ago, said:

Use label inside scrollpane and increase the label height when you add new line

Actually that's EXACTLY what I use. And that's EXACTLY what made me discover this problem lol

Edited by BabY
Typo
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...