[comp.windows.x.motif] how to position popups

pp0s@GLOBE.EDRC.CMU.EDU (Peter Colin Piela) (02/05/91)

I am using Wcl with Motif 1.1, and am having problems specifying 
the location of popups. My current approach is:

1. set the x and y resources of the popup using WcSetValueCB

2. Use WcPopupCB to display the popup

Setting the x and y resources does not seem to have an effect on 
the default behavior which seems to be to center the popup on
the current cursor location.

Any suggestions would be appreciated. Thanks, Peter

lynnes@ALEX.CSS.GOV (Christopher Lynnes) (02/05/91)

>I am using Wcl with Motif 1.1, and am having problems specifying 
>the location of popups. My current approach is:
>
>1. set the x and y resources of the popup using WcSetValueCB
>
>2. Use WcPopupCB to display the popup
>
>Setting the x and y resources does not seem to have an effect on 
>the default behavior which seems to be to center the popup on
>the current cursor location.

	If your popup is a subclass of XmBulletinBoard (as are the Motif
dialogs), then the XmNdefaultPosition resource is probably controlling
your popup position: when set to True (the default) the popup is centered
over the parent of the popup. If you set it to False, the x and y relative
to the root window coordinates will generally be used, though I don't
think that is guaranteed. 

Chris Lynnes                                ===== : = :::::
Teledyne Geotech                           ===== :: == :::::
Alexandria, Virginia                            ::: ===
(703) 739-7316                                  ::   ==
lynnes@seismo.CSS.GOV                           :     =