Code for Listbox object bulk adding

Hello!

Attached is a method to bulk add arrays to a list box, when the array
isn’t a string array. Feel free to add it to wxSugar.

Example:
arr = [[Wx::RED, “Red”],[Wx::GREEN, “Green”],[Wx::BLUE, “Blue”]]

listbox.insert_obj_items(arr, “[1]”)
…would add 3 list box items with “Red”-“Green”-“Blue”

listbox.insert_obj_items(arr, “[1].length”)
…would add 3 list box items with “3”-“5”-“4”

listbox.insert_obj_items(arr, “.length”)
…would add 3 list box items with “2”-“2”-“2”

Best regards,

Jari W.