Scrollbar in StaticText.

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

andrewfeng123
Just popping in
Just popping in
Posts: 20
Joined: Sat Sep 02, 2017 20:28

Scrollbar in StaticText.

Postby andrewfeng123 » Fri Jan 26, 2018 17:38

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?)
Last edited by andrewfeng123 on Thu Feb 01, 2018 15:51, edited 1 time in total.

andrewfeng123
Just popping in
Just popping in
Posts: 20
Joined: Sat Sep 02, 2017 20:28

Re: Scrollbar in StaticText.

Postby andrewfeng123 » Thu Feb 01, 2018 15:40

Any help available?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Scrollbar in StaticText.

Postby Ident » Thu Feb 01, 2018 20:23

Show us some screenshots. I dont know what you mean honestly.
CrazyEddie: "I don't like GUIs"

andrewfeng123
Just popping in
Just popping in
Posts: 20
Joined: Sat Sep 02, 2017 20:28

Re: Scrollbar in StaticText.

Postby andrewfeng123 » Fri Feb 02, 2018 23:21

Here we go:
Normal StaticText:
Image

StaticText with enough lines,
Image

How do I changed the thumb size?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Scrollbar in StaticText.

Postby Ident » Sat Feb 03, 2018 09:32

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.
CrazyEddie: "I don't like GUIs"

andrewfeng123
Just popping in
Just popping in
Posts: 20
Joined: Sat Sep 02, 2017 20:28

Re: Scrollbar in StaticText.

Postby andrewfeng123 » Wed Feb 07, 2018 02:49

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 3 guests