Submitted by JXB on Sat, 08/08/2015 - 01:27
Forums:
To all,
a couple of (stupid) questions on the NX UI builder
1. It seems that there is no 'slide bar' option. Am I correct? Went through all the options but cannot see anything. Just need to double check.
2. If one "load" a list of name in a list box when the GUI is displayed to the user, is there a way of selecting all the items in the list (by default)
Thanks
Regards
JXB
re: UI builder
I don't currently have a license for the UI builder. I was hoping that someone with UI experience would stop by and enlighten all of us. You might want to try the GTAC programming forum, if you haven't already...
re: UI builder
Update is
to get a 'slidebar' effect use an Integer or Double block and change the PresentationStyle to either Scale or ScaleKeyin.
To select all items in a ListBox, you need to make sure the ListBox allows mutiple selection. You can set this at design time using the SingelSelection option to false. To select all items the ListBox object has the following methods:
setSelectedItemBooleans()
Here you pass an array of integers with the same number of elements as there are list items. The values must be 0 to not select that item, anything else to select that item.
setSelectedItems()
Here you pass an array of integers holding the list positions that you want selected.
setSelectedItemStrings()
Here you pass an array of strings holding the ones you want selected.
This is probably the easiest way to select ALL items in a ListBox. Simply use getListItems() method to get an array of the list items, then pass that array into the setSelectedItemStrings() method.
Thanks
Regards