| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
| Moderator: | STAR::VATNE |
| Created: | Mon Oct 30 1989 |
| Last Modified: | Mon Dec 31 1990 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3726 |
| Total number of notes: | 19516 |
Can I set the MENU_HISTORY value on a popup menu widget inside the
activate callback of a button that's on the menu? I'm trying to
implement "To-bottom" and "To-top" buttons at the top and bottom of the
popup menu (as a work-around for the menu popping-up off-screen bug),
but changing MENU_HISTORY on the pop-up menu doesn't seem to have any
effect.
This attribute is supposed to take a widget reference, isn't it?
John
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1859.1 | Another approach? | DECWIN::KLEIN | Thu Dec 07 1989 12:38 | 26 | |
It would be much easier to use this code to keep the popup menu from going
offscreen:
...
/* Let the toolkit try to position the popup menu. Then, to be
* friendly, make sure that it is completely visible on the screen. */
DwtMenuPosition (popupMenuW, eventP);
if (popupMenuW->core.x < 0) popupMenuW->core.x = 0;
if ((popupMenuW->core.x + popupMenuW->core.width) >
popupMenuW->core.screen->width) popupMenuW->core.x =
popupMenuW->core.screen->width - popupMenuW->core.width;
if (popupMenuW->core.y < 0) popupMenuW->core.y = 0;
if ((popupMenuW->core.y + popupMenuW->core.height) >
popupMenuW->core.screen->height) popupMenuW->core.y =
popupMenuW->core.screen->height - popupMenuW->core.height;
/* And pop it up. */
XtManageChild (popupMenuW);
...
-steve-
| |||||
| 1859.2 | ULTRA::WRAY | John Wray, Secure Systems Development | Thu Dec 07 1989 15:04 | 8 | |
Is "popupMenuW->core.screen->" a core widget record, or is some other
data type used to describe the screen? If so, what?
Looks like the SDL that generated the ADA declarations I'm using for
this stuff left something to be desired, as there doesn't seem to be
much type information left.
John
| |||||
| 1859.3 | Not a widget... | LEOVAX::TREGGIARI | Thu Dec 07 1989 16:08 | 3 | |
core.screen is a "Screen" as defined in Xlib.h. Leo | |||||