View Single Post
Old 07-09-2020, 09:45 AM   #725
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 50
Default

Hello all,
Thanks for this great library, was able to create my GUI with v3.
However, I'm having a really hardtime using listbox : i spent two hours trying to add an element in my listbox...

Spent some times in the example, but there's no example of adding an element in a listbox.

I just have a button mapped to add a value in my table, and maybe refresh the listbox.

If someone is able to help

Thanks!

PHP Code:
squares = {149162536496481}
local function addText()
  -- 
Get the list boxs selected item(s)
  
local selected GUI.Val("lst_titles")
  
local lstbox GUI.findElementByName("lst_titles")

    -- 
Get and sort the selected item numbers
    
for kv in pairs(selected) do
        
Msg(v)
        
Msg(k)
    
end
    
     table
.insert(squares99)
     
lstbox.recalculateWindow()
     
end 

Last edited by aurelien; 07-09-2020 at 09:58 AM.
aurelien is offline   Reply With Quote