Reference MWAPI

Choice Category

This category of gadgets provides applications with a means to display a list of choices to the user. The MWAPI standard specifies six gadgets for listing choices:

  • List Box

  • List Button

  • List Entry Box

  • Long List Box

  • Radio Button Set

  • Table

The abundance of gadgets for displaying choices gives the programmer much flexibility with the design of the interface. Choices used by each gadget in this category are the values subscripted from the gadget's CHOICE attribute. The maximum stringlength for a choice is 255 characters, and the aggregate of characters in all choices assigned to a gadget must not exceed 16,383. These requirements can be overcome by killing off nodes of choices already viewed. Special code is required in case the user wishes to scroll back to the deleted choices. Several of the gadgets in this example call tag NAMES, with the name of the gadget as the parameter passed, to set up their list of choices.

NAMES(N) ; create a list of names+1 S J=0+2 F I=   "DOE,JOHN,"DOG,JACK","DOE,JANE","STOOGE,CURLY","CUPIT,RHODA","MOUSE,MICKEY","TOES,JOE","HABIBI,PHILLIP","STAR,TWINKLE","HAIR,ANGLE","CART,CARL","KITE,CINDY","DON,GLUE" D+3 .S J=J+1+4 .S W("WINDOW","G","N,"CHOICE"J)=I+5 Q

Figure 5.2: List Box
LIST ; list box+1  K W,^$W+2  S W("WINDOW","POS")="100,50" +3  S W("WINDOW","SIZE")="230,200"+4  S W("WINDOW","TITLE")="LIST BOX"+5  S W("WINDOW","EVENT","CLOSE")="CLOSE^GADGETS"+6  S W("WINDOW","G","LIST","TYPE")="LIST"+7  S W("WINDOW","G","LIST","POS")="20,30"+8  S W("WINDOW","G","LIST","SIZE")="190,170"+9  S W("WINDOW","G","LIST","TITLE")="Patient names"+10 D NAMES("LIST")+11 S W("WINDOW","G","LIST","SELECTMAX")=3+12 S W("WINDOW","G","LIST","EVENT","SELECT")="SEL^GADGETS"+13 S W("WINDOW","G","LIST","EVENT","DESELECT")="SEL^GADGETS"+14 M ^$W=W+15 S ^$DI($PD,"FOCUS")="WINDOW,LIST"+16 ESTA+17 Q

The List Box gadget is an excellent choice for displaying a list of choices due to its ease of...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Thermocouple Elements
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.