EditTable Widget WebFAQ - Q20
/*****************************************************
The following code makes it possible for you to click
a button to place the specific cell at the center of
the viewing area.
*****************************************************/
:
static char *control_names[] = { "ScrollToPosition","Help", "Exit" };
#define SPECIFIC_ROW 8
#define SPECIFIC_COL 8
:
:
static void
ControlCallback(widget, id, unused)
Widget widget;
int id;
XtPointer unused;
{
switch (id) {
case XtNumber(control_names) - 3:
XintScrollScrollToPosition(Scroll,
(float)SPECIFIC_COL, (float)SPECIFIC_ROW, 50.0, 50.0);
break;
case XtNumber(control_names) - 2: Help(); break;
case XtNumber(control_names) - 1: exit (0); break;
default: XtError("Bad control code passed to ControlsProc");
}
}
:
:
Click here for the Image
Back to EditTable FAQ
© INT 1996.