Posted 07 July 2013 - 11:27 PM
I am trying to write a function that prints out a context menu that is sized correctly in height to the amount of options in a set table, and in width to fit the size of the longest string in the same table. Here is an example of the table:
I have the bulk of the function done, but I don't know how to get my program to work out the length of the longest string in the table. I am doing this so that I can add more options without having to hard-code the menu gui into it. Any help will be appreciated. Thank you
options = {
"New program"
"File Manager"
"Edit program"
}
I have the bulk of the function done, but I don't know how to get my program to work out the length of the longest string in the table. I am doing this so that I can add more options without having to hard-code the menu gui into it. Any help will be appreciated. Thank you