Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!uwmcsd1!uxc!uxc.cso.uiuc.edu!urbsdc!mmeyer From: mmeyer@urbsdc.Urbana.Gould.COM Newsgroups: comp.windows.x Subject: Positioning label widgets Message-ID: <60200004@urbsdc> Date: 10 Sep 88 20:24:00 GMT Lines: 41 Nf-ID: #N:urbsdc:60200004:000:1190 Nf-From: urbsdc.Urbana.Gould.COM!mmeyer Sep 10 15:24:00 1988 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 #include #include #include 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(); }