Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > XTREE > XTREE Techniques

Modeless Operation

Scroll Prev Top Next More

In addition to the additional programming required (multiple XCALL XTREE operations using different XTR_OPCODE values), these present the problem of how to respond to the user clicking on the list box when some other input field has the input focus (i.e. when not inside of an XCALL XTREE operation). You can prevent this problem by disabling the control on exit (see flags XTF_DISABLE) or you can define a keyboard click-to-enable string in XTR_KBDSTR, which would be received by whatever input routine had the focus at the time the user clicked on the tree control. This would allow your application logic to take appropriate action, presumably including executing a new XCALL XTREE operation. If you neither disable the pick list when inactive, nor define a click-to-enable string in XTR_KBDSTR, then the user may have the impression of operating on the control, but your program will not be aware of it. (It could, however, retrieve the current selection(s) at some later time by executing XCALL XTREE with XTR_OPCODE set to 4 and flags set to include XTF_NOSEL, which would have the effect of simply returning the current selection information.)

The recommended sequence for XTR_KBDSTR is chr(7)+chr(250)+###. (where ### is the desired EXITCODE number to be returned from the INFLD call which receives the sequence.) For example, to return EXITCODE 175 to INFLD when the user clicks on the pick list (while an INFLD operation is active), set XTR_KBDSTR=chr(7)+chr(250)+"175." (Note the trailing period.)