Jump to content

Help with scroll pane not appears in the window


Anzo

Recommended Posts

I never learned to use the scroll pane, always i have a problem with the scroll pane.

The problem is that, scroll pane not appears in the window and if I use guiScrollPaneSetScrollBars and guiScrollPaneSetVerticalScrollPosition appears the text, but not scrolling.

Code:

GUIEditor = { 
    window = {}, 
    scrollpane = {}, 
    staticimage = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(252, 79, 249, 368, "", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
         
    GUIEditor.staticimage[1] = guiCreateStaticImage(9, 23, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[2] = guiCreateStaticImage(10, 79, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[3] = guiCreateStaticImage(10, 135, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[4] = guiCreateStaticImage(10, 191, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[5] = guiCreateStaticImage(10, 248, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[6] = guiCreateStaticImage(10, 304, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[7] = guiCreateStaticImage(10, 361, 55, 41, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[8] = guiCreateStaticImage(75, 23, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[9] = guiCreateStaticImage(75, 79, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[10] = guiCreateStaticImage(75, 135, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[11] = guiCreateStaticImage(75, 191, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[12] = guiCreateStaticImage(75, 248, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.staticimage[13] = guiCreateStaticImage(75, 304, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.window[1]) 
    GUIEditor.scrollpane[1] = guiCreateScrollPane(224, 23, 15, 335, false, GUIEditor.window[1])     
         
    if  GUIEditor.scrollpane[1] then 
        guiScrollPaneSetScrollBars(GUIEditor.scrollpane[1],false,true) 
    end 
end 
) 

Link to comment

the scrollpane is an invisible gui element. It can be used to include infinite number of gui elements, whenever It is full, you can start scrolling down to find other elements inside, if there.

In case that it is the parent of another gui element, that gui element can have any possible position, You will always find it in the scrollpane by just scrolling

Link to comment

Put images inside scrollpane...

  
GUIEditor = { 
    window = {}, 
    scrollpane = {}, 
    staticimage = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
function() 
    GUIEditor.window[1] = guiCreateWindow(252, 79, 249, 368, "", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
    GUIEditor.scrollpane[1] = guiCreateScrollPane(224, 23, 15, 335, false, GUIEditor.window[1])     
    GUIEditor.staticimage[1] = guiCreateStaticImage(9, 23, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[2] = guiCreateStaticImage(10, 79, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[3] = guiCreateStaticImage(10, 135, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[4] = guiCreateStaticImage(10, 191, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[5] = guiCreateStaticImage(10, 248, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[6] = guiCreateStaticImage(10, 304, 55, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[7] = guiCreateStaticImage(10, 361, 55, 41, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[8] = guiCreateStaticImage(75, 23, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[9] = guiCreateStaticImage(75, 79, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[10] = guiCreateStaticImage(75, 135, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[11] = guiCreateStaticImage(75, 191, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[12] = guiCreateStaticImage(75, 248, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
    GUIEditor.staticimage[13] = guiCreateStaticImage(75, 304, 147, 51, ":Archievements/grey-001.png", false, GUIEditor.scrollpane[1]) 
     
        
    if  GUIEditor.scrollpane[1] then 
        guiScrollPaneSetScrollBars(GUIEditor.scrollpane[1],false,true) 
    end 
end 
) 

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