Jump to content

Problem with ComboBox


MIKI785

Recommended Posts

Hello, I created comboBox but it shows default value only, I'm adding rows without any warnings/errors but it just won't show when I click on it, it's empty, where's the problem?

  
local mujNick = string.gsub(getPlayerName(getLocalPlayer()), "#%x%x%x%x%x%x", "") 
  
seznam = guiCreateComboBox(103,38,132,25,mujNick,false,statsGui)--It's created.. with my nick. 
  
function testPurposes(cmd, value) 
  
outputChatBox("nuze")--It outputs 
guiComboBoxAddItem( seznam, value )--Do nothing 
outputChatBox("done")--Also outputs 
  
end 
  
addCommandHandler("testik", testPurposes) 
  

It's not whole code.. I have whole GUI created in event onClientResourceStart

Link to comment

The items are being added, but the height isn't enough.

local mujNick = string.gsub(getPlayerName(getLocalPlayer()), "#%x%x%x%x%x%x", "") 
  
seznam = guiCreateComboBox(103,38,132,25,mujNick,false,statsGui)--It's created.. with my nick. 
  
function testPurposes(cmd, value) 
outputChatBox("nuze")--It outputs 
guiComboBoxAddItem( seznam, value )--Do nothing 
outputChatBox("done")--Also outputs 
local x, y = guiGetSize(seznam, false) 
guiSetSize(seznam, x, y+25, false) 
end 
addCommandHandler("testik", testPurposes) 

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