mmeyer@urbsdc.Urbana.Gould.COM (09/11/88)
Help!!!! I would like to be able to put a label widget at a certain position on the screen. I can do that by adding a geometry string on the command line, but would like to change the geometry setting (mainly x and y position) on the fly. I have looked through all the client code (clients/xterm/scrollbar.c in particular) and haven't been successful at setting XtNx and XtNy. Here is a short program. Thanks in advance! --morris meyer Morris A. Meyer, Gould CSD-Urbana USEnet: {ihnp4,uunet}!uiucdcs!ccvaxa!mmeyer ARPAnet: mmeyer@xenurus.gould.com or meyerm@ei.ecn.purdue.edu =========================== CUT HERE ======================== #include <X11/Xlib.h> #include <X11/Intrinsic.h> #include <X11/Atoms.h> #include <X11/Label.h> main(argc, argv) int argc; char **argv; { Widget toplevel, labelWidget; static Arg wargs[] = { {XtNlabel, (XtArgVal) STRING}, {XtNx, (XtArgVal) 100}, {XtNy, (XtArgVal) 100} }; toplevel = XtInitialize(argv[0], "XLabel", NULL, 0, &argc, argv); labelWidget = XtCreateManagedWidget(argv[0], labelWidgetClass, toplevel, wargs, XtNumber(wargs)); XtRealizeWidget(toplevel); XtMainLoop(); }