Jump to content

Help "guiGridListSetItemColor" (:


iPrestege

Recommended Posts

hello how are you , fine ? , am here for asking what,s the problem here with color item @ gridlist .. ,

  
row1 = guiGridListAddRow(Grid) 
row2 = guiGridListAddRow(Grid) 
row3 = guiGridListAddRow(Grid) 
row4 = guiGridListAddRow(Grid) 
row5 = guiGridListAddRow(Grid) 
row6 = guiGridListAddRow(Grid) 
guiGridListSetItemColor ( Grid, row2, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row1, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row3, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row4, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row5, 250, 154, 255 ) 
guiGridListSetItemColor ( Grid, row6, 250, 154, 255 )    
  
guiGridListSetItemText(Grid, row1, Column, "●●●|| The Beginnig ||●●●", false, true) 
guiGridListSetItemText(Grid, row2, Column, "●●●|| Al-Taous ||●●●", false, true) 
guiGridListSetItemText(Grid, row4, Column, "●●●|| Al-Dairi ||●●●", false, true) 
guiGridListSetItemText(Grid, row5, Column, "●●●|| Drift Street ||●●●", false, true) 
guiGridListSetItemText(Grid, row6, Column, "●●●|| BattleGround  ||●●●", false, true) 

:)

Link to post
  • Other Languages Moderators

hello how are you , fine ? , am here for asking what,s the problem here with color item @ gridlist .. ,

  
row1 = guiGridListAddRow(Grid) 
row2 = guiGridListAddRow(Grid) 
row3 = guiGridListAddRow(Grid) 
row4 = guiGridListAddRow(Grid) 
row5 = guiGridListAddRow(Grid) 
row6 = guiGridListAddRow(Grid) 
guiGridListSetItemColor ( Grid, row2, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row1, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row3, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row4, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row5, 250, 154, 255 ) 
guiGridListSetItemColor ( Grid, row6, 250, 154, 255 )    
  
guiGridListSetItemText(Grid, row1, Column, "●●●|| The Beginnig ||●●●", false, true) 
guiGridListSetItemText(Grid, row2, Column, "●●●|| Al-Taous ||●●●", false, true) 
guiGridListSetItemText(Grid, row4, Column, "●●●|| Al-Dairi ||●●●", false, true) 
guiGridListSetItemText(Grid, row5, Column, "●●●|| Drift Street ||●●●", false, true) 
guiGridListSetItemText(Grid, row6, Column, "●●●|| BattleGround  ||●●●", false, true) 

:)

Your 3th argument must be a column. 8 - 13 lines.

Link to post
row1 = guiGridListAddRow(Grid) 
row2 = guiGridListAddRow(Grid) 
row3 = guiGridListAddRow(Grid) 
row4 = guiGridListAddRow(Grid) 
row5 = guiGridListAddRow(Grid) 
row6 = guiGridListAddRow(Grid) 
guiGridListSetItemColor ( Grid, row2, Coulmn, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row1, Coulmn, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row3, Coulmn, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row4, Coulmn, 250, 154, 255 )    
guiGridListSetItemColor ( Grid, row5, Coulmn, 250, 154, 255 ) 
guiGridListSetItemColor ( Grid, row6, Coulmn, 250, 154, 255 )    
  
guiGridListSetItemText(Grid, row1, Column, "●●●|| The Beginnig ||●●●", false, true) 
guiGridListSetItemText(Grid, row2, Column, "●●●|| Al-Taous ||●●●", false, true) 
guiGridListSetItemText(Grid, row4, Column, "●●●|| Al-Dairi ||●●●", false, true) 
guiGridListSetItemText(Grid, row5, Column, "●●●|| Drift Street ||●●●", false, true) 
guiGridListSetItemText(Grid, row6, Column, "●●●|| BattleGround  ||●●●", false, true) 
  

still not working! :!::?:

Link to post
  
local x, y = guiGetScreenSize() 
Wnd = guiCreateWindow(220, 130, 371, 315, "Welcome To Gta Pro Server", false) 
guiWindowSetSizable(Wnd, false) 
guiSetAlpha(Wnd, 1.00) 
guiSetProperty(Wnd, "CaptionColour", "FF0080FF") 
guiSetVisible(Wnd, false) 
Grid = guiCreateGridList(10, 25, 351, 223, false, Wnd) 
Column = guiGridListAddColumn(Grid, " Welcome Please Chose into", 0.9) 
row1 = guiGridListAddRow(Grid) 
row2 = guiGridListAddRow(Grid) 
row3 = guiGridListAddRow(Grid) 
row4 = guiGridListAddRow(Grid) 
row5 = guiGridListAddRow(Grid) 
row6 = guiGridListAddRow(Grid) 
guiGridListSetItemColor ( Grid, row2, Coulmn, 250, 154, 255 )   
guiGridListSetItemColor ( Grid, row1, Coulmn, 250, 154, 255 )   
guiGridListSetItemColor ( Grid, row3, Coulmn, 250, 154, 255 )   
guiGridListSetItemColor ( Grid, row4, Coulmn, 250, 154, 255 )   
guiGridListSetItemColor ( Grid, row5, Coulmn, 250, 154, 255 ) 
guiGridListSetItemColor ( Grid, row6, Coulmn, 250, 154, 255 )   
  
guiGridListSetItemText(Grid, row1, Column, "●●●|| The Beginnig ||●●●", false, true) 
guiGridListSetItemText(Grid, row2, Column, "●●●|| Al-Taous ||●●●", false, true) 
guiGridListSetItemText(Grid, row4, Column, "●●●|| Al-Dairi ||●●●", false, true) 
guiGridListSetItemText(Grid, row5, Column, "●●●|| Drift Street ||●●●", false, true) 
guiGridListSetItemText(Grid, row6, Column, "●●●|| BattleGround  ||●●●", false, true) 
  

Link to post
  • Other Languages Moderators

Well you hide your window.

guiSetVisible(Wnd, false) 

And your variable Coulmn doesn't defined. You must use Column variable.

Also i said you use set color after set up text.

yes. , Can You Show Example?

It's copy-paste. You should fix it yourself. I just say you all mistakes.

Link to post
local x, y = guiGetScreenSize() 
Wnd = guiCreateWindow(220, 130, 371, 315, "Welcome To Gta Pro Server", false) 
guiWindowSetSizable(Wnd, false) 
guiSetAlpha(Wnd, 1.00) 
guiSetProperty(Wnd, "CaptionColour", "FF0080FF") 
guiSetVisible(Wnd, false) 
Grid = guiCreateGridList(10, 25, 351, 223, false, Wnd) 
Column = guiGridListAddColumn(Grid, " Welcome Please Chose into", 0.9) 
  
aGrid = 
{ 
    { '●●●|| The Beginnig ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Taous ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Dairi ||●●●', 250, 154, 255 }; 
    { '●●●|| Drift Street ||●●●', 250, 154, 255 }; 
    { '●●●|| BattleGround  ||●●●', 250, 154, 255 }; 
} 
  
for _, aV in ipairs( aGrid )do 
    local gRow = guiGridListAddRow( Grid ) 
    guiGridListSetItemText( Grid, 
        gRow, 
        1, tostring( aV[ 1 ] ), false, false  
    ) 
    guiGridListSetItemColor( Grid, 
        gRow, 
        1, aV[ 2 ], aV[ 3 ], aV[ 4 ] 
    ) 
end 

Link to post
  • Other Languages Moderators
local x, y = guiGetScreenSize() 
Wnd = guiCreateWindow(220, 130, 371, 315, "Welcome To Gta Pro Server", false) 
guiWindowSetSizable(Wnd, false) 
guiSetAlpha(Wnd, 1.00) 
guiSetProperty(Wnd, "CaptionColour", "FF0080FF") 
guiSetVisible(Wnd, false) 
Grid = guiCreateGridList(10, 25, 351, 223, false, Wnd) 
Column = guiGridListAddColumn(Grid, " Welcome Please Chose into", 0.9) 
  
aGrid = 
{ 
    { '●●●|| The Beginnig ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Taous ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Dairi ||●●●', 250, 154, 255 }; 
    { '●●●|| Drift Street ||●●●', 250, 154, 255 }; 
    { '●●●|| BattleGround  ||●●●', 250, 154, 255 }; 
} 
  
for _, aV in ipairs( aGrid )do 
    local gRow = guiGridListAddRow( Grid ) 
    guiGridListSetItemText( Grid, 
        gRow, 
        1, tostring( aV[ 1 ] ), false, false  
    ) 
    guiGridListSetItemColor( Grid, 
        gRow, 
        1, aV[ 2 ], aV[ 3 ], aV[ 4 ] 
    ) 
end 

Well he just copy-paste your code. Good job.

Link to post
local x, y = guiGetScreenSize() 
Wnd = guiCreateWindow(220, 130, 371, 315, "Welcome To Gta Pro Server", false) 
guiWindowSetSizable(Wnd, false) 
guiSetAlpha(Wnd, 1.00) 
guiSetProperty(Wnd, "CaptionColour", "FF0080FF") 
guiSetVisible(Wnd, false) 
Grid = guiCreateGridList(10, 25, 351, 223, false, Wnd) 
Column = guiGridListAddColumn(Grid, " Welcome Please Chose into", 0.9) 
  
aGrid = 
{ 
    { '●●●|| The Beginnig ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Taous ||●●●', 250, 154, 255 }; 
    { '●●●|| Al-Dairi ||●●●', 250, 154, 255 }; 
    { '●●●|| Drift Street ||●●●', 250, 154, 255 }; 
    { '●●●|| BattleGround  ||●●●', 250, 154, 255 }; 
} 
  
for _, aV in ipairs( aGrid )do 
    local gRow = guiGridListAddRow( Grid ) 
    guiGridListSetItemText( Grid, 
        gRow, 
        1, tostring( aV[ 1 ] ), false, false  
    ) 
    guiGridListSetItemColor( Grid, 
        gRow, 
        1, aV[ 2 ], aV[ 3 ], aV[ 4 ] 
    ) 
end 

@ Kenix Yes , :mrgreen:

Thank You it works :mrgreen::roll: .

Link to post

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