Article View: comp.windows.x
Article #37948Athena Widget (formwidget,menubutton)
From: Francois.Bitz
Date: Sat, 10 Mar 1990 19:59
Date: Sat, 10 Mar 1990 19:59
30 lines
1336 bytes
1336 bytes
When using the menuButton Widget I found that the
menuName ressource does not seem to 'get' copied internally
so that if I don't re-allocate a string first all menu buttons
created in the same routine will call the same
simpleMenu widget to be poped up (i,e the last one).
This seems to be a bug since all other widgets usually
copy strings internally.
char tmp[10];
for(i=0;i<5) {
n=0;
sprintf(tmp,"m_n%d",i);
XtSetArg(arg[n], XtNmenuName,tmp); n += 1;
...
create button menu widget
}
when I replace this with tmp=malloc(10); then everything is ok.
Also:
Is there an easy way to tell a viewport widget to
postion the top/left corner of the child at a desired position.
I need this because I have a (large) list widget child in which I would
always like the current item to be visible. It would be nice
to have the same way of positioning viewport thumbs as in the
scrollbar widget.
thanks
Technical Details
Message-ID:
<9003102001.AA02496@ATHENA.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!think!mintaka!bloom-beacon!SAM.CS.CMU.EDU!Francois.BitzShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!think!mintaka!bloom-beacon!SAM.CS.CMU.EDU!Francois.Bitz From: Francois.Bitz@SAM.CS.CMU.EDU Newsgroups: comp.windows.x Subject: Athena Widget (formwidget,menubutton) Message-ID: <9003102001.AA02496@ATHENA.MIT.EDU> Date: 10 Mar 90 19:59:35 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 30