Setting XResources - Xwindows

This is a discussion on Setting XResources - Xwindows ; I have several applications that make up my "system" and I want to set common resource values for them. We currenly do the following: PASadm*XmText.Background: linen PASadm*XmText.foreground: black PASadm*XmTextField.Background: linen PASadm*XmTextField.foreground: black PAS*XmText.Background: linen PAS*XmText.foreground: black PAS*XmTextField.Background: linen PAS*XmTextField.foreground: black ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Setting XResources

  1. Setting XResources


    I have several applications that make up my "system" and I want to set common
    resource values for them.

    We currenly do the following:

    PASadm*XmText.Background: linen
    PASadm*XmText.foreground: black
    PASadm*XmTextField.Background: linen
    PASadm*XmTextField.foreground: black

    PAS*XmText.Background: linen
    PAS*XmText.foreground: black
    PAS*XmTextField.Background: linen
    PAS*XmTextField.foreground: black

    PASsls*XmText.Background: linen
    PASsls*XmText.foreground: black
    PASsls*XmTextField.Background: linen
    PASsls*XmTextField.foreground: black

    Why won't the following work instead:

    *XmText.Background: linen
    *XmText.foreground: black
    *XmTextField.Background: linen
    *XmTextField.foreground: black

    I am quite confused since the following does work:

    *XmText.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    *XmTextField.fontList: -adobe-helvetica-medium-r-normal-*-11-*

    So how can I specify all instances of a particular widget across all apps?

    --
    Jake Colman

    Principia Partners LLC Phone: (201) 209-2467
    Harborside Financial Center Fax: (201) 946-0320
    902 Plaza Two E-mail: colman@ppllc.com
    Jersey City, NJ 07311 www.principiapartners.com

  2. Re: Setting XResources

    Jake Colman wrote in
    news:76iskl4yyo.fsf@newjersey.ppllc.com:
    > Why won't the following work instead:
    >
    > *XmText.Background: linen
    > *XmText.foreground: black
    > *XmTextField.Background: linen
    > *XmTextField.foreground: black


    In general, more specific resources will override less specific ones.
    See the Xt manual for a definition of what "more specific" means.

    Ken Lee, http://www.rahul.net/kenton/

  3. Re: Setting XResources

    >>>>> "KL" == Ken Lee writes:

    KL> Jake Colman wrote in
    KL> news:76iskl4yyo.fsf@newjersey.ppllc.com:
    >> Why won't the following work instead:
    >>
    >> *XmText.Background: linen
    >> *XmText.foreground: black
    >> *XmTextField.Background: linen
    >> *XmTextField.foreground: black


    KL> In general, more specific resources will override less specific ones.
    KL> See the Xt manual for a definition of what "more specific" means.

    This makes sense and I have found my problem.

    But what about the following:

    *XmText.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    *XmTextField.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    *XmScrolledText.fontList: -adobe-helvetica-bold-r-normal-*-12-*

    My XmScrolledText widget honors the font settings for XmText but will not
    honor the more specific setting for the XmScrolledText. Why won't it pick up
    the XmScrolledText setting?

    --
    Jake Colman

    Principia Partners LLC Phone: (201) 209-2467
    Harborside Financial Center Fax: (201) 946-0320
    902 Plaza Two E-mail: colman@ppllc.com
    Jersey City, NJ 07311 www.principiapartners.com

  4. Re: Setting XResources

    >>>>> "Jake" == Jake Colman writes:

    Jake> This makes sense and I have found my problem.

    Jake> But what about the following:

    Jake> *XmText.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    Jake> *XmTextField.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    Jake> *XmScrolledText.fontList: -adobe-helvetica-bold-r-normal-*-12-*

    Jake> My XmScrolledText widget honors the font settings for XmText but
    Jake> will not honor the more specific setting for the XmScrolledText.
    Jake> Why won't it pick up the XmScrolledText setting?

    Never mind. I just realized that an XmScrolledText widget is a compound
    widget. The solution is the following:

    *XmScrolledWindow*XmText.fontList: -adobe-helvetica-medium-r-normal-*-12-*
    *XmText.fontList: -adobe-helvetica-medium-r-normal-*-11-*
    *XmTextField.fontList: -adobe-helvetica-medium-r-normal-*-11-*


    --
    Jake Colman

    Principia Partners LLC Phone: (201) 209-2467
    Harborside Financial Center Fax: (201) 946-0320
    902 Plaza Two E-mail: colman@ppllc.com
    Jersey City, NJ 07311 www.principiapartners.com

+ Reply to Thread