problem with scrollbar on static text

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Sjizo
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Thu Aug 31, 2006 08:44

problem with scrollbar on static text

Postby Sjizo » Mon Dec 18, 2006 14:34

Hey all,

while reading through the forums I came acros this
post. In it there was a post of CE that you can add a vertical scrollbar to a static text widget by calling the function setVerticalScrollbarEnabled(true). So I tried this in my Lua script

Code: Select all

winMgr:getWindow("Root/ConsoleWindow"):setVerticalScrollbarEnabled(true)

where Root/ConsoleWindow is a static text widget
and I get the following error in the CEGUI.log

Code: Select all

18/12/2006 15:16:38 (Error)   Exception: Unable to execute Lua script file: '../datafiles/lua_scripts/consoleGui.lua'

[string "../datafiles/lua_scripts/consoleGui.lua"]:62: attempt to call method 'setVerticalScrollbarEnabled' (a nil value)


Have the scrollbars been taken away from the static text again? Or am I doing something wrong. I am using CEGUI 0.5

Sjizo
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Thu Aug 31, 2006 08:44

Postby Sjizo » Wed Dec 20, 2006 09:36

after speaking to Dalfy on irc I tried a diferent approach. I tried to use the setProperty function.

Code: Select all

winMgr:getWindow("Root/ConsoleWindow"):setProperty("VerticalScrollbar","true")


In the log I get the following error message

Code: Select all

19/12/2006 17:26:04 (Error)   Exception: There is no Property named 'VerticalScrollbar' available in the set.
19/12/2006 17:26:04 (Error)   Exception: System::executeScriptFile - An exception was thrown during the execution of the script file.


I also tried verticalScrollbar instead of VerticalScrollbar but it had the same result. Can anyone tell me what the correct way to do this is?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sun Dec 31, 2006 15:35

Hello, I got the same issue, did you find any solution ? anybody can help us ?

Edit:
There is one difference: i don't even get these errors ! the scrollbars just don't show up. And i'm using multilined text.

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

Postby spannerman » Sun Dec 31, 2006 16:55

Yes, I think the property has changed at some point. I think it is now VertScrollbar, as in:

Code: Select all

statTxt->setProperty("VertScrollbar", "True");

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Jan 02, 2007 14:44

Yeah true i figured it out yesterday evening :) everything works fine now, thank you :)

Sjizo
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Thu Aug 31, 2006 08:44

Postby Sjizo » Tue Jan 09, 2007 14:14

I did a "kind of" solution. I just tested how many lines I could fit into my text field and would then just delete the first line when too many lines were visible.
Thanx for this answer, it would look much better if it works. Gonna try it later.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests