Quantcast
Channel: PTC Community: Message List - Arbortext
Viewing all articles
Browse latest Browse all 3717

Re: Multiple-selection list box

$
0
0

Hi Jing--

 

If there will only a few items in your list, you might be able to get by with a readvar command, something like this:

 

 

function test() {

  local foo, bar, baz;

  # for readvar, the -choice option with only one choice gives a checkbox

  readvar -prompt "Choose" -choice "foo" foo -choice "bar" bar -choice "baz" baz;

  # checked items will return 1, unchecked will return 0

  response("foo: $foo; bar: $bar; baz: $baz");

}

 

The readvar command above will display a dialog like this:

readvar.png

 

Of course, in your case you would need to construct the "readvar" command string dynamically based on what you find in your document. If it's a long list, the command might end up being too long, or your list might make a dialog too big to fit on the screen.

 

In that case, you will probably need to resort to making a simple XUI dialog, for example with a combobox, where the listitems in the combobox are dynamically generated using ACL code. (Comboboxes can be configured to be multi-select, where users choose multiple entries by ctrl-clicking.) You could also make a XUI dialog that is basically empty, and have your ACL code dynamically add separate checkboxes for each of the choices you found in the document.

 

--Clay


Viewing all articles
Browse latest Browse all 3717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>