}
XtSetArg(args, XtNdisplayCaret, True);
XtSetValues(w, &args, 1);
- XawTextSetInsertionPoint(w, 9999); // position cursor at end
XtSetKeyboardFocus((Widget) data, w);
previous = w;
}
XtSetArg(args[j], XtNright, XtChainRight); j++;
XtSetArg(args[j], XtNresizable, True); j++;
XtSetArg(args[j], XtNwidth, 85); j++;
-// XtSetArg(args[j], XtNheight, 20); j++;
+ XtSetArg(args[j], XtNinsertPosition, 9999); j++;
tcTime = XtCreateManagedWidget("TC", asciiTextWidgetClass, form, args, j);
XtAddEventHandler(tcTime, ButtonPressMask, False, SetFocus, (XtPointer) popup);
XtSetArg(args[j], XtNright, XtChainLeft); j++;
XtSetArg(args[j], XtNresizable, True); j++;
XtSetArg(args[j], XtNwidth, 60); j++;
-// XtSetArg(args[j], XtNheight, 20); j++;
+ XtSetArg(args[j], XtNinsertPosition, 9999); j++;
engThreshold = XtCreateManagedWidget("Threshold", asciiTextWidgetClass, form, args, j);
XtAddEventHandler(engThreshold, ButtonPressMask, False, SetFocus, (XtPointer) popup);
XtSetArg(args[j], XtNright, XtChainRight); j++;
XtSetArg(args[j], XtNresizable, True); j++;
XtSetArg(args[j], XtNwidth, i&1 ? 245 : 50); j++;
+ XtSetArg(args[j], XtNinsertPosition, 9999); j++;
if(i&1) {
XtSetArg(args[j], XtNstring, * (char**) controlDesc[i].ptr ?
* (char**) controlDesc[i].ptr : ""); j++;
void SettingsPopUp(ChessProgramState *cps)
{
Arg args[16];
- Widget popup, layout, dialog, edit=NULL, form, oldform, last, b_ok, b_cancel, leftMargin = NULL;
+ Widget popup, layout, dialog, edit=NULL, form, oldform, last, b_ok, b_cancel, leftMargin = NULL, textField = NULL;
Window root, child;
int x, y, i, j, height, width, h, c;
int win_x, win_y;
XtSetArg(args[j], XtNright, XtChainRight); j++;
XtSetArg(args[j], XtNresizable, True); j++;
XtSetArg(args[j], XtNstring, cps->option[i].type==Spin ? def : cps->option[i].textValue); j++;
+ XtSetArg(args[j], XtNinsertPosition, 9999); j++;
edit = last;
cps->option[i].handle = (void*)
- (last = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, j));
+ (textField = last = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, j));
XtAddEventHandler(last, ButtonPressMask, False, SetFocus, (XtPointer) popup);
if(cps->option[i].type == TextBox) break;
SettingsUp = True;
previous = NULL;
- if(edit)SetFocus(edit, popup, (XEvent*) NULL, False);
+ if(textField)SetFocus(textField, popup, (XEvent*) NULL, False);
}
void FirstSettingsProc(w, event, prms, nprms)