ListBox Scrollbar Width

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

ListBox Scrollbar Width

Post by LunaRebirth »

I'm pretty sure that to change the scrollbar width on a listbox, i'll probably need to write or change the code for the listbox.

Just thought I'd ask if there's some easy way to change the listbox scrollbar size.
It looks fine on PC, but it's barely small enough to touch on Android

EDIT
getVerticalScrollBar() in the .h file - doesn't seem to actually be getting the scrollbar
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ListBox Scrollbar Width

Post by CuteAlien »

I think (not tested right now) you can change it with IGUISkin::setSize(irr::gui::EGDS_SCROLLBAR_SIZE, size);
You get the the skin from the guienvironment.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Agent_X
Posts: 41
Joined: Sun Sep 16, 2012 3:44 am

Re: ListBox Scrollbar Width

Post by Agent_X »

I had to go look at the source of some of my older WIP's to see how I had done this, and found that CuteAlien's solution is correct.
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: ListBox Scrollbar Width

Post by LunaRebirth »

Tried CuteAlien's solution.
All the size is doing is changing the highlight width of the selected listbox item, the scrollbar width itself has no change.
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ListBox Scrollbar Width

Post by CuteAlien »

OK, guess I'll have to check then.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ListBox Scrollbar Width

Post by CuteAlien »

Hm, seems to work in my test.
Image
Left is with:

Code: Select all

 
env->getSkin()->setSize(irr::gui::EGDS_SCROLLBAR_SIZE, 10);
 
Right with:

Code: Select all

 
env->getSkin()->setSize(irr::gui::EGDS_SCROLLBAR_SIZE, 30);
 
(I copied them together in gimp - can't have different sizes at the same time with current solution!)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: ListBox Scrollbar Width

Post by LunaRebirth »

Hm. This is what mine looks like:

Image

But I am using the 5065 branch for Android -- so I suppose that's my own issue.
Thanks for the help :-)
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: ListBox Scrollbar Width

Post by CuteAlien »

Hm, that explains it not really - that code is older than the ogl_es branch. But I would need code to reproduce it... (modifed hello-world or so would be enough).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply