Page 1 of 1
Scrollbar in StaticText.
Posted: Fri Jan 26, 2018 17:38
by andrewfeng123
I'm implementing a console window and I'm using staticText in TaharazLook.
Maybe it's by TaharazLook default that a vertical scrollbar will just be added when the StaticText contains more lines. However the scrollbar thumb size is static so it looks weird. I want to change its size based on the page size, but I can't find the Scrollbar Window (Name or ID?)
Re: Scrollbar in StaticText.
Posted: Thu Feb 01, 2018 15:40
by andrewfeng123
Any help available?
Re: Scrollbar in StaticText.
Posted: Thu Feb 01, 2018 20:23
by Ident
Show us some screenshots. I dont know what you mean honestly.
Re: Scrollbar in StaticText.
Posted: Fri Feb 02, 2018 23:21
by andrewfeng123
Here we go:
Normal StaticText:
StaticText with enough lines,
How do I changed the thumb size?
Re: Scrollbar in StaticText.
Posted: Sat Feb 03, 2018 09:32
by Ident
Got it. Have you looked if any of the other skins have variable thumb size? E.g. windowslook, vanilla, etc.? If they dont then it looks like we lack this feature in CEGUI. I think this is something that should be added.
It would require a thumbnail that consists of three parts (fixed size one-end, stretchable center, fixed size second-end) and the calculation for the variable size you described would have to be part of the scrollbar element in C++ (either the core or the look class, not sure). Any experienced programmer should be able to integrate this feature into CEGUI. In case you are up for the task I can help you and review the PR and have it merged.
The thumbnail would need to have a new core class and new look class as well btw, so that it can dynamically scale. It should work very similar to a progressbar.
Re: Scrollbar in StaticText.
Posted: Wed Feb 07, 2018 02:49
by andrewfeng123
Haha I am definitely not "experienced" because I am still in high school.
But I guess there's no harm giving it a try, so I have added this to my list.
School is getting busy so it might be a while until I have time.