Label with scrolling?
I have a ZO_ScrollContainer holding both a ZO_DefaultEditMultiLineForBackdrop and a CT_LABEL. When the Editbox is overflowing, I can scroll down. But when the Label is overflowing, I can see "..." at the bottom-left of it, and there's no scrolling.
I tried changing things around in all kinds of ways, but couldn't get any results. Couldn't find a simple example or virtual in the code, either. Any advice? Code:
ScrollContainer = WINDOW_MANAGER:CreateControlFromVirtual("Somename_ScrollContainer", MainWindow, "ZO_ScrollContainer") |
Seriously, nobody has any clue about this? Nobody made a label text block with scrolling?
|
Try :SetCanWrap(true)
Code:
Label = WINDOW_MANAGER:CreateControl("Somename_ContentsLabel", ScrollContainer, CT_LABEL) |
Quote:
Error. Doesn't exist. I can't find it anywhere in docs or code, either. |
Correct me if I'm wrong but a label is not scrollable as it only holds one line of text as far as I know.
Or maybe you need to put the string with \n line break into the label control text like labelCtrl:SetText("Line1\nLine2") The possible functions for a label control can be found here: http://wiki.esoui.com/Controls#LabelControl |
There is the code for the guild MotD which seems to use ZO_ScrollingSavingEditBox as a wrapper for this scrollable edit box / label combo. You can see the relevant code in
https://github.com/esoui/esoui/tree/...guild/keyboard Check out guildhome_keyboard.xml and guildhome_keyboard.lua for an example on how to use it. Without more specific context to your code it can be hard to point out the exact problem for people that might want to help. |
Done those suggestions. The MOTD example is very unfriendly, when translating to a somewhat different situation.
I've come up with my own solution which is working fine, although should have been handled on the dev' side of things. If it helps anyone in the future: Code:
ScrollContainer = WINDOW_MANAGER:CreateControlFromVirtual("ScrollContainer", MainWindow, "ZO_ScrollContainer") Code:
Contents = WINDOW_MANAGER:CreateControlFromVirtual("Contents", ScrollContainer, "ZO_DefaultEditMultiLineForBackdrop") |
All times are GMT -6. The time now is 11:08 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI