bkilgore@nmsu.edu (Bruce Kilgore) (02/12/90)
Hello, I am having a small problem with the form widget. After I create a ManagedChild on the form widget and try to move the widget by XtMoveWidget, and then setting the XtSetValues with the new coordinates, upon creating another widget onto the form causes the original widget to move back to it created location. Is there any way I can change the coordinates of an exisiting widget permanently? Thank-you William Bruce Kilgore bkilgore@nmsu.edu
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (02/13/90)
> I am having a small problem with the form widget. After I create a > ManagedChild on the form widget and try to move the widget by XtMoveWidget, > and then setting the XtSetValues with the new coordinates, upon > creating another widget onto the form causes the original widget to > move back to it created location. Is there any way I can change the > coordinates of an exisiting widget permanently? Don't do that. The Form widget's geometry manager will place its children where it believes is apropriate, given the size and location of each of the other children. You can control the order of the children and their relative positions (i.e. this widget will be below that widget, and to the right of this other widget) but you cannot specify an exact placement. The Form widget does not support it. So what can you do about this? You have two choices, either find a composite widget that does what you want, or write one yourself. Trying to force a composite to do something it wasn't designed for is just asking for trouble. Also: Don't use XtMoveWidget. This function is reserved for the exclusive use of Parent widgets to move their children around. Application programmers should use the SetValues Interface only. If you can't do it with XtSetValues then you probabally are doing something you shouldn't, and you'll more than likely confuse this widget's Parent, causing strange behavior on resize. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213
marbru@auto-trol.UUCP (Martin Brunecky) (02/13/90)
In article <9002121640.AA10381@expo.lcs.mit.edu> kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) writes: > >> I am having a small problem with the form widget. After I create a >> ManagedChild on the form widget and try to move the widget by XtMoveWidget, >> and then setting the XtSetValues with the new coordinates, upon > >Don't do that. > I agree, BUT. The trouble is that R3 and R4 Intrinsics document does not distinguish between functionality designed for the application programmer, and functionality designed for a widget writer. Basically, R3/R4 Intrinsic document is for a widget writer. There is NO document for the poor user, besides the D Young's books (but his distinctions between user's calls and widget-writer's calls is also a little bit fuzzy). From my experience, X toolkit novices - for what ever reason - tend to use the most obscure Xt calls at first. So, for R5 or later, I would suggest to restructure the Intrinsics document so that it reflects audience: - a novice Xt user - an experienced Xt user ( several Xt calls fall into "use but bevare") - a widget writer -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* Martin Brunecky marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404