Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I have a Pixmap in a Label?

Label pixmap
0
Posted

How can I have a Pixmap in a Label?

0

Bob Hays (bobhays@spss.com) wrote: Pixmap px_disarm, px_disarm_insens; Widget Label1; Pixel foreground, background; Arg args[4]; Arg arg[] = { { XmNforeground, &foreground }, { XmNbackground, &background } }; Label1 = XmCreateLabel ( Shell1, “Label1”, (Arg *) NULL, (Cardinal) 0 ); XtGetValues ( Label1, arg, XtNumber ( arg ) ); px_disarm = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), mtn_bits, mtn_width, mtn_height, foreground, background, DefaultDepth(display,DefaultScreen(display))); px_disarm_insens = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), mtn_ins_bits, mtn_ins_width, mtn_ins_height, foreground, background, DefaultDepth(display,DefaultScreen(display))); n = 0; XtSetArg(args[n], XmNlabelType, XmPIXMAP); n++; XtSetArg(args[n], XmNlabelPixmap, px_disarm); n++; XtSetArg(args[n], XmNlabelInsensitivePixmap, px_disarm_insens ); n++; XtSetValues ( Label1, args, n ); XtManageChild(Label1); That will cause the foreground and background of your pixm

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123