Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!crdgw1!nepal.crd.ge.com!laymon From: laymon@nepal.crd.ge.com Newsgroups: comp.windows.x Subject: loading resources problem Message-ID: <6230@crdgw1.crd.ge.com> Date: 21 Mar 90 20:38:03 GMT Sender: news@crdgw1.crd.ge.com Reply-To: laymon@nepal.crd.ge.com () Distribution: na Organization: General Electric Corp. R&D, Schenectady, NY Lines: 71 I am having trouble setting certain resources. In a previous posting, I mentioned the labels on push buttons widgets were not visible in reverse video mode. I set up two resource files to work with two applications, ROWTEST and FORMEDIT. The files are listed below: ------------------------------------------------------------------ /* .ROWTEST - RESOURCE FILE FOR ROWTEST EXAMPLE */ *Rowtest*ReverseVideo: off *Rowtest*rowcol*singleRow: TRUE *Rowtest*rowcol*layoutType: maximum_columns *Rowtest**RowCol*mode: one_of_many *Rowtest*PushButton*translations: : select () *Rowtest*button1*label: Button One *Rowtest*button2*label: Button Two *Rowtest*button3*label: Button Three *Rowtest*button4*label: Button Four *Rowtest*button5*label: Button Five *Rowtest*button6*label: Button Six ----------------------------------------------------------------- /* .FORMEDIT - RESOURCE FILE FOR FORMEDIT EXAMPLE */ *Formedit*ReverseVideo: off *Formedit*button1*label: Name: *Formedit*button2*label: Phone: *Formedit*button3*label: Address: *Formedit*TextEdit*x: 100 *Formedit*field1*y: 10 *Formedit*field2*y: 40 *Formedit*field3*y: 70 *Formedit*PushButton*x: 10 *Formedit*button1*y: 10 *Formedit*button2*y: 40 *Formedit*button3*y: 70 ----------------------------------------------------------------------- If I load .ROWTEST using xrdb with the '-m' option, then run ROWTEST, the buttons do not show up. If I check the resource values using XtGetApplicationResources, the values are foreground= 1, background= 1, and reverse video = 1. If I then load .FORMEDIT, then run ROWTEST, the buttons show up in normal video (black on white) and the values are foreground= 1, background= 1, and reverse video = 0. If I run xrdb -query after loading .ROWTEST, I get *ReverseVideo: on, *Rowtest*ReverseVideo:off. After loading .FORMTEST, the reverse video resources are the same, except the value *Formedit*ReverseVideo:off has been added. It appears as if the program ROWTEST is getting the value for the reverse video resource from the FORMEDIT hierarchy rather than the ROWEDIT resource hierarchy. This also happens with other resources, like the button labels. I have compiled this program on both a Sun 3 running X11/R3 and a Sun 4 running X11/R4 with the same results. If I add the lines: *foreground: White *background: Black to .ROWTEST, I can get the buttons to show up in reverse video (white on black). As I mentioned in my previous posting, I do not have to change any resources for command widgets to show their labels properly in reverse video. Can any one explain what I am doing wrong or point me to a reference on resources. I read the explanation in Young's book, but they are not working they way I would have expected. Marc Laymon E-MAIL: laymon@nepal.crd.ge.com GE R&D Schenectady, NY