Jump to content

Trying to understand guiCreateScrollPane.


Recommended Posts

Hiya!

I have been fiddling around with guiCreateScrollPane and just cant get it to work properly.

I have this atm:

SoDScrollPane = guiCreateScrollPane( 0.1, 0.1, 0.5, 0.9, true, tabTrophySOD )
 
guiCreateStaticImage( 0.03, 0.3, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.5, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.7, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.9, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )

There's only no scrollbar coming, and just puts the 4 images above eachother.

How would I set the heights for the images? How would I even get the scrollbar in it?

If I am correct, guiCreateSrollPane is a invisible window, wich should create a scrollbar in itself once its getting filled with items such as staticimage. But its not working as I want it to, any help?

Link to comment

It wont create a scrollbar unless you create something on it beyond its original size (remember that scrollpanes arent limited to 0-1 (relative) like other elements)

so if you simply added a fifth image on it at 1.1 y (beyond 1, so beyond the height you originally specified) it will expand and add a vertical scrollbar:

SoDScrollPane = guiCreateScrollPane( 0.1, 0.1, 0.5, 0.9, true, tabTrophySOD )
 
guiCreateStaticImage( 0.03, 0.3, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.5, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.7, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 0.9, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )
guiCreateStaticImage( 0.03, 1.1, 0.25, 0.25, "img/trophy.png", true, SoDScrollPane )

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...