Help with a Motif Widget Display Problem

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Help with a Motif Widget Display Problem

Submitted by Anonymous (not verified) on Fri, 06/15/2012 - 12:07

I am not a Motif developer by trade. I know enough motif to get by. But I am having a problem with some Motif Label Widgets not showing up on a display.
I am porting a program written about 10 years ago for the Solaris operating system to linux. All the GUIs were written using Motif. I first recompiled the code and updated where necessary on a system running Solaris 8. On this particular GUI There are Label widgets added to a Form Widget. The Label and Form Widgets are created using "XtVaCreateManagedWidget". When the GUI comes up the Labels do not show up, but the Mouse events tied to the labels still work. So I tried a couple of things like changing my desktop. I currently use Gnome for my desktop, so I switched to CDE and also tried OpenWindows. CDE the labels did not display on, but on OpenWindows the Labels appearred. So I know they are working.
When I run this on Red Hat 9 Linux box the Labels appear. But someone else was testing on a newer Linux box and the Labels did not appear.
Below is the snippet of code that creates the Label widgets. If any one could give me insight into what is going on I would appreciate it.
static void CreateEvent(int num)<br />
{</p>
<p> XmString xms;</p>
<p> if(event[num] != NULL)<br />
return;</p>
<p> event[num] = XtVaCreateWidget ("Event",<br />
xmFormWidgetClass, Events,<br />
XmNmarginWidth, 2,<br />
XmNleftAttachment, XmATTACH_POSITION,<br />
XmNleftPosition, 100*num/MAX_EVENTS,<br />
XmNrightAttachment, XmATTACH_POSITION,<br />
XmNrightPosition, 100*(num+1)/MAX_EVENTS,<br />
XmNtopAttachment, XmATTACH_POSITION,<br />
XmNtopPosition, 0,<br />
XmNbottomAttachment, XmATTACH_POSITION,<br />
XmNbottomPosition, 100,<br />
NULL);</p>
<p> xms = XmStringLtoRCreate("SYSTEM \n Unscreened",<br />
XmSTRING_DEFAULT_CHARSET);<br />
title[num] = XtVaCreateManagedWidget ("Detector",<br />
xmLabelWidgetClass, event[num],<br />
XmNtraversalOn, False,<br />
XmNleftAttachment, XmATTACH_FORM,<br />
XmNrightAttachment, XmATTACH_FORM,<br />
XmNtopAttachment, XmATTACH_FORM,<br />
XmNlabelString, xms,<br />
NULL);<br />
XmStringFree(xms);</p>
<p> XtAddEventHandler (title[num],<br />
ButtonPressMask | KeyPressMask | KeyReleaseMask,<br />
False, (XtEventHandler)ButtonClicked, (XtPointer)num);</p>
<p> axislabel[num] = XtVaCreateManagedWidget ("Time",<br />
xmLabelWidgetClass, event[num],<br />
XmNtraversalOn, False,<br />
XmNleftAttachment, XmATTACH_FORM,<br />
XmNrightAttachment, XmATTACH_FORM,<br />
XmNbottomAttachment, XmATTACH_FORM,<br />
NULL);</p>
<p> pane[num] = XtVaCreateManagedWidget ("Pane",<br />
xmFormWidgetClass, event[num],<br />
XmNtraversalOn, False,<br />
XmNleftAttachment, XmATTACH_FORM,<br />
XmNrightAttachment, XmATTACH_FORM,<br />
XmNtopAttachment, XmATTACH_WIDGET,<br />
XmNtopWidget, title[num],<br />
XmNbottomAttachment, XmATTACH_WIDGET,<br />
XmNbottomWidget, axislabel[num],<br />
NULL);</p>
<p>}
Kevin Stedman
Sr. Software Engineer
GD-AIS
‹ Best way to poll the parallel port? Books on Motif ›

sbayeta

Sat, 02/26/2005 - 06:05#1

Help with a Motif Widget Display Problem

Any chance it's due to a shared library changing version across the systems you describe?