Jump to content

Gridlist Problem


Ryan212

Recommended Posts

Posted
function Gui() 
Window_Group = guiCreateWindow(470, 258, 536, 344, "Painel Password do Grupo", false) 
guiWindowSetSizable(Window_Group, false) 
guiSetVisible(Window_Group, false) 
  
gridlist_group = guiCreateGridList(9, 71, 517, 263, false, Window_Group) 
local colllumn_Name = guiGridListAddColumn(gridlist_group, "Nome do grupo:", 0.2) 
local colllumn_Pass1 = guiGridListAddColumn(gridlist_group, "Password do Portão 1:", 0.2) 
local colllumn_Pass2 = guiGridListAddColumn(gridlist_group, "Password do Portão 2:", 0.2) 
local colllumn_Pass3 = guiGridListAddColumn(gridlist_group, "Password do Portão 3:", 0.2) 
local colllumn_Status = guiGridListAddColumn(gridlist_group, "Estado:", 0.2) 
  
label = guiCreateLabel(16, 21, 96, 40, "Nome do grupo:", false, Window_Group) 
guiLabelSetVerticalAlign(label, "center") 
edit = guiCreateEdit(116, 26, 144, 35, "Nome", false, Window_Group) 
button_close = guiCreateButton(414, 26, 102, 35, "Fechar", false, Window_Group) 
guiSetProperty(button_close, "NormalTextColour", "FFAAAAAA") 
  
--EventHandler 
addEventHandler("onClientGUIClick", button_close, closeWindow, false) 
end 
  
  
addGroupPassword = function(a, b, c, d, e) 
    local row1 = guiGridListAddRow ( gridlist_group ) 
    guiGridListSetItemText ( gridlist_group, row1, colllumn_Name, a, false, false ) 
    guiGridListSetItemText ( gridlist_group, row1, colllumn_Pass1, b, false, false ) 
    guiGridListSetItemText ( gridlist_group, row1, colllumn_Pass2, c, false, false ) 
    guiGridListSetItemText ( gridlist_group, row1, colllumn_Pass3, d, false, false ) 
    guiGridListSetItemText ( gridlist_group, row1, colllumn_Status, e, false, false ) 
end 

Well, I'm trying add something to gridlist and that isn't accept and I saw so much warns about "bad Arguments".

I do like set it on next page like that:

Gopen1 = "1" 
Gopen2 = "2" 
Gopen3 = "3" 
  
Gclose1 = "4" 
Gclose2 = "5" 
Gclose3 = "6" 
  
addGroupPassword("Bandido", Gopen1,Gopen2,Gopen3, "Aberto") 
addGroupPassword("Bandido", Gclose1,Gclose2,Gclose3, "Fechado") 

Posted
You didn't attach the function Gui to any event?

I used only that for see the gui.

function openWindow() 
    Gui() 
    guiSetVisible(Window_Group, not guiGetVisible(Window_Group)) 
    showCursor(not isCursorShowing()) 
end 

Posted

Every time you do Gui() that will create the window, grid list, label and the button again, that will duplicate..

Posted
Every time you do Gui() that will create the window, grid list, label and the button again, that will duplicate..

I removed it, and continue same warn, and isn't adding anything.

Posted
function openWindow() 
    if (guiGetVisible(Window_Group) == false) then 
        guiSetVisible(Window_Group, true) 
        if not (isCursorShowing()) then 
            showCursor(true) 
        end 
    else 
        guiSetVisible(Window_Group, false) 
        showCursor(false) 
    end 
end 

and put this under gui function:

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), Gui) 

and put this to gui function:

guiSetVisible(Window_Group, false) 

Posted
function openWindow() 
    if (guiGetVisible(Window_Group) == false) then 
        guiSetVisible(Window_Group, true) 
        if not (isCursorShowing()) then 
            showCursor(true) 
        end 
    else 
        guiSetVisible(Window_Group, false) 
        showCursor(false) 
    end 
end 

and put this under gui function:

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), Gui) 

the problem isn't that, anyways, I changed the things, I started to work by database

and put this to gui function:

guiSetVisible(Window_Group, false) 

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