[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
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 |
2896.0. "Help with pixmap toggle-buttons" by JABBER::MARSDEN (Debbie bluebirds over the white cliffs...) Thu Jun 07 1990 12:28
I am experiencing some level of frustration trying to make a toggle button
in a dialog box I've created, a pixmap rather than a text label.
Initially I tried getting the drawable-id using XtWindow(window_id),
however I was getting BadDrawable errors. I realise that this was because
I had NOT realised the window_id widget (the dialog box). I am now trying
to use a draw_id derived from the shell widget (which has been realised)
but I'm now experiencing
X error event received from server: BadMatch - parameter mismatch
Failed request major op code 62 (X_CopyArea)
Failed request minor op code 0 (if applicable)
ResourceID 0x500024 in failed request (if applicable)
Serial number of failed request 120
Current serial number in output stream 199
%XLIB-E-ERROREVENT, error event received from server
%TRACE-E-TRACEBACK, symbolic stack dump follows
module name routine name line rel PC abs PC
00098070 00098070
00097E95 00097E95
........................................................................
I've scoured this and other DECWindow conferences for a clue and think its
something to do with *depth* ??. I've enclosed a code segment which may
or may not help someone in putting me on the right track.
Thanks in advance for any/all pointers
(cross posted in DECWINDOWS_PROGRAMMING)
/Debbie
Code segment follows ....
Widget shell;
Widget *window_id;
Display *dpy;
Drawable draw_id;
Screen *screen_id;
.
.
.
dpy = XtDisplay(shell);
printf("\n display id = %d", dpy);
screen_id = XtScreen(shell);
printf("\n screen ptr = %d", screen_id);
draw_id = XRootWindowOfScreen(screen_id);
printf("\n drawable id = %d", draw_id);
status = XReadBitmapFile(
dpy, draw_id,
filename,
&pix_width,
&pix_height,
&pix_id,
&pix_hot_x,
&pix_hot_y);
if (status != BitmapSuccess)
{
printf("\nCould not load up bitmap");
LIB$STOP(0);
}
DwtSetArg(DwtPixmap, arglist, argcount++, DwtNlabelType);
DwtSetArg(pix_id, arglist, argcount++, DwtNpixmapOn);
DwtSetArg(pix_id, arglist, argcount++, DwtNpixmapOff);
item_widget[item] = DwtToggleButtonCreate
( *window_id, "",
arglist,
argcount);
XtManageChild(item_widget[item]);
.
.
T.R | Title | User | Personal Name | Date | Lines |
---|
2896.1 | Depth mismatch? | DECWIN::KLEIN | | Thu Jun 07 1990 13:46 | 4 |
| Sounds like a depth mismatch. The icon must be a (deep) pixmap rather than
a bitmap. Are you only getting this error on a color (non-monochrome) system?
-steve-
|
2896.2 | It was the depth ! | JABBER::MARSDEN | Debbie bluebirds over the white cliffs... | Fri Jun 08 1990 10:32 | 8 |
| Yep Steve,
It was OK on a monochrome system. I've changed the way I read in my
bitmap data..(I no longer use the XReadBitMapFile routine), I now
create pixmaps from the bitmap data, and all appears to be OK.
Thanks for the pointer.
/Debbie
|