BabY Posted August 8, 2017 Share Posted August 8, 2017 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
NeXuS™ Posted August 8, 2017 Share Posted August 8, 2017 What you could try is creating a rendertarget, drawing the labels in that rendertarget and then drawing the rendertarget on your screen with an offset on the Y axis. Link to comment
BabY Posted August 8, 2017 Author Share Posted August 8, 2017 Draw labels in a render target? Seems like I can't find out how to do it, I only managed to draw dxText which isn't really flexible in my case. Link to comment
NeXuS™ Posted August 8, 2017 Share Posted August 8, 2017 I'm not sure if you can do it, but just try it as you'd do with a dxText. Btw, why is dxtext out of your case? Ahh, nvm, it can't be done like that. Did you try using the guiSetPosition function? Link to comment
BabY Posted August 8, 2017 Author Share Posted August 8, 2017 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
NeXuS™ Posted August 8, 2017 Share Posted August 8, 2017 If it doesn't affect the limit, you'll have to do some way around with removing those lines which are not being displayed. 1 Link to comment
BabY Posted August 8, 2017 Author Share Posted August 8, 2017 I tried to avoid this path, but seems like it's the only way then. Thanks for your time and support. Good luck with dxLib. Link to comment
NeXuS™ Posted August 8, 2017 Share Posted August 8, 2017 (edited) 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. Edited August 8, 2017 by NeXuS™ Link to comment
</Mr.Tn6eL> Posted August 9, 2017 Share Posted August 9, 2017 Use label inside scrollpane and increase the label height when you add new line Link to comment
BabY Posted August 9, 2017 Author Share Posted August 9, 2017 (edited) 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 August 9, 2017 by BabY Typo Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now