Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XmNlabelString

68 views
Skip to first unread message

vmnithin

unread,
Nov 8, 2006, 12:57:46 AM11/8/06
to
Hello,

I created a LABEL widget using XtVaCreateWidget function.
Now I want to update the XmNlabelString fom another function in which I

will pass a string and I want to fetch the corresponding entry from the

Resource file which cant be done by the XtVaSetValues function. Please
hel[p me to find a solution
For example the string I passed to the function is "quit" and
the corresponding entry in the Resource file is " *quit.labelString
: EXIT ".
Now I want the label to be updated as "EXIT".
This can be done at the time of creation fo widget by using the
XtVaCreateWidget(). But for me I want to update an already created
widget.
I cant use XtVaSetValues because it takes the string directly as

void setString(const char *s)
{
xmstr = XmStringCreateLocalized( (char *)s );
//I want a method to load from Resource file
XtVaSetValues( Widget,
XmNlabelString,xmstr,
NULL );
XmStringFree(xmstr);
}


with Regards
NithinVM

The Ghost In The Machine

unread,
Nov 8, 2006, 9:48:20 PM11/8/06
to
In comp.windows.x.intrinsics, vmnithin
<vmni...@gmail.com>
wrote
on 7 Nov 2006 21:57:46 -0800
<1162965465.9...@f16g2000cwb.googlegroups.com>:

An XrmDatabase can be had from the call XtDatabase() or
XtScreenDatabase() (declared in Intrinsic.h); once you have that,
you can try XrmGetResource() (declared in Xresource.h). You'll
need an XrmNameList == XrmQuarkList; you can get this from
XrmStringToQuarkList.

(I'll admit I don't know precisely how well all this will work, but
that's what a read of the include files suggests.)

--
#191, ewi...@earthlink.net
Q: "Why is my computer doing that?"
A: "Don't do that and you'll be fine."

--
Posted via a free Usenet account from http://www.teranews.com

0 new messages