Texas Instruments TI-89 Developer's Manual page 388

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

346
Dialog
(continued)
TI-89 / TI-92 Plus
Differences:
None
See Also:
DialogAdd, DialogNew, Resource Compiler
Example:
DWORD NoCallBack( WORD DlgId, DWORD Value ) {
return TRUE;
}
void TestDialog( void ) {
WORD opts[3];
char buf[22];
char outStr[256];
strcpy( buf, "FIRST" );
strcpy( buf+11, "SECOND" );
opts[0] = opts[1] = 1; /* default to 1st pop-up item */
opts[2] = 2; /* default to 2nd pop-up item */
if (KB_ENTER == Dialog( &tDialog, -1, -1, buf, opts )) {
sprintf( outStr, "Edit1: %s\nEdit 2: %s\nPopup1: %d\nPopup2: %d\nPopup3: %d",
buf, buf+11, opts[0], opts[1], opts[2] );
DlgNotice( "tDialog", outStr );
}
}
DIALOG tDialog, 180, 90, NoCallBack {
SCROLL_REGION, {DF_CLR_ON_REDRAW, 12, 29}, 175,69, 3,5,
EDIT,
{DF_SCROLLABLE|DF_TAB_SPACES, 12, 30}, "EDIT1", 0, 10, 11
EDIT,
{DF_SCROLLABLE|DF_TAB_SPACES, 12, 40}, "EDIT2", 11, 10, 11
POPUP,
{DF_SCROLLABLE|DF_TAB_ELLIPSES, 12, 50}, "FIRST POPUP", Popup1, 0
POPUP,
{DF_SCROLLABLE|DF_TAB_ELLIPSES, 12, 60}, "2ND POPUP", Popup2, 1
POPUP,
{DF_SCROLLABLE|DF_TAB_ELLIPSES, 12, 70}, "3RD POPUP", Popup2, 2
MENU,
{0, 12, 11}, MenuPages
HEADER,
{0, 0, 0}, "DIALOG HEADER", PDB_OK, PDB_CANCEL
}
POPUP Popup1, RC_NO_IDS, 0 {
"Item 1-1", 1
"Item 1-2", 2
}
POPUP Popup2, RC_NO_IDS, 0 {
"Item 2-1", 1
"Item 2-2", 2
"Item 2-3", 3
}
TOOLBOX MenuPages, RC_NO_IDS, 0, 120 {
"PAGE 1", 1
"PAGE 2", 2
"PAGE 3", 3
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Dialog
/* default edit strings */
Not for Distribution
2,3, 9
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents