home *** CD-ROM | disk | FTP | other *** search
- #include <scl1.h>
-
- /*********************
- TagList2 example */
-
- char *options[]={
- "Option 1",
- "Option 2",
- "Option 3",
- "Option 4",
- "Option 5",
- "Option 6",
- "Option 7",
- 0};
-
- char tarray[7];
-
- main()
- {
- TLData tl;
- int i,Mess;
-
- TagList2(TL_INIT,&tl); /* initialize structure */
- tl.UpperRow=6; /* modify position */
- tl.LowerRow=15;
- tl.LeftCol=20;
- tl.RightCol=60;
- tl.Array=options; /* our data*/
- tl.TagArray=tarray; /* tag array */
- TagList2(TL_DRAW,&tl); /* draw */
- InitMouse(IM_SHOW);
- Mess=TagList2(TL_ACTIVE,&tl); /* active */
- if(Mess==TL_OK)
- {
- printf("\nThe following options were tagged:\n");
- for(i=0;i < 7;++i)
- {
- if(tarray[i])
- printf("%s\n",options[i]);
- }
- }
- else
- printf("\nOperation canceled by user\n");
- }