Jump to content

Window with Scroll Bar


Recommended Posts

I know and i have look there and i have now a Scroll Bar but the info in wiki has no example :(

...
wnd = guiCreateWindow( 311,101,1044,804,"Teleport Menu",false );
local scroll = guiCreateScrollPane( 10, 10, 1044, 804, false, wnd);
local scrolldata = guiScrollPaneSetScrollBars(wnd, true, false);

And nothing... i have make some buttons and text more than the 1044 but the Scroll Bar make nothing.

And for what is that?? In wiki i found no info about this

guiScrollPaneGetHorizontalScrollPosition 
guiScrollPaneGetVerticalScrollPosition 
guiScrollPaneSetHorizontalScrollPosition 
guiScrollPaneSetVerticalScrollPosition

BTW you sure that the wiki search funktion dont bite ;)

Link to comment

try to use guiCreateScrollBar, instead of scrollPane

i think scroll pane was not what you wanted..

well, i lil bit modified your script:

local scX, scY = guiGetScreenSize();
wnd = guiCreateWindow( scX/2-644/2, scY/2-504/2, 644, 504, "Teleport Menu", false );
local scroll = guiCreateScrollBar( 0.05, 0.9, 0.9, 0.05, true, true, wnd );

look, i centralized position of window and reduced its resolution (that was too big window i think xD). How i centralized it? I got client screen size, then i take half of it, and subtract the half of width and height of your window. Pretty easy maths, isnt it? :)

Ive made a scroll bar at the bottom of the window..you can place it where you want on your window.. btw, you should use relative coordinates of placement of element you want attach to a window.

In your case it was wrong, it was like non-attached element, so you would have two different gui elements instead of one window with attached scroll bar

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...