Date: Wed, 22 Oct 2003 06:42:40 -0700
Reply-To: Gary Weeks <garyweeks@MINDSPRING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gary Weeks <garyweeks@MINDSPRING.COM>
Subject: Re: Setting Column Label Colors in a Viewtable
Content-Type: text/plain; charset=ISO-8859-1
That works, thanks. One other small item, the _setColumnAttribute
method cannot be called from the INIT/TERM label of model SCL so if I
put it in the MAIN label it does not execute until an event occurs in
the viewtable. I would like the labels to be change before any events,
is there a way to do this with out the user having to click on the
RandyHerbison@WESTAT.COM (Randy Herbison) wrote in message news:<916067ABEE7DF34EA4DFE700B1A94A1F71D6A7@Remailnt3>...
> The _setColumnAttributes method belongs to the legacy classes data set model
> and data set data model which I think Viewtable uses. If you are using the
> V8 SAS data set model class, you can assign the colors by simply modifying
> the attribute value:
> -----Original Message-----
> From: Gary Weeks [mailto:garyweeks@MINDSPRING.COM]
> Sent: Tuesday, October 21, 2003 4:38 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Setting Column Label Colors in a Viewtable
> "Richard A. DeVenezia" <firstname.lastname@example.org> wrote in message
> > "Gary Weeks" <email@example.com> wrote in message
> > news:firstname.lastname@example.org...
> > > SAS-Lers,
> > >
> > > What I am trying to do is dynamically set the color of a column
> > > label in a viewtable using SCL in Version 9.0. If I use
> > >
> > > _self_._getColumnAttributes(inColAttribs);
> > >
> > > the two attributes I think I want are listed as "LBCOLOR='Secondary
> > > Background'" and "LFCOLOR='Foreground'", which I hope are label
> > > background color and label foreground color respectively. When I
> > > try to set these attributes in the model SCL using
> > >
> > > rc1=_self_._setAttributeValue('lbcolor','black');
> > > rc2=_self_._setAttributeValue('lfcolor','gray');
> > >
> > > I get rc1=2 and rc2=2, which means that the attribute is undifined.
> > >
> > > Can anyone help me?
> > >
> > > Thanks,
> > >
> > > -Gary
> > Try
> > inColAttribs = makelist();
> > rc = setnitemc (inColAttribs, 'name-of-column-in-table', 'NAME');
> > _self_.getColumnAttributes(inColAttribs);
> > rc = setnitemc (inColAttribs, 'black', 'lbcolor');
> > rc = setnitemc (inColAttribs, 'gray', 'lfcolor');
> > _self_.setColumnAttributes(inColAttribs);
> > rc = dellist (inColAttribs);
> > I've got lots of AF examples at url in sig.
> Thanks for the reply. I can't get my code to compile, the code looks
> rc = setnitemc(inColAttribs, colname, 'NAME');
> call putlist(inColAttribs, 'In top of True Loop:', 0);
> rc1 = setnitemc (inColAttribs, 'black', 'lbcolor');
> rc2 = setnitemc (inColAttribs, 'gray', 'lfcolor');
> call putlist(inColAttribs, 'At bottom of true Loop:', 0);
> _self_._setColumnAttributes('lbcolor', inColAttribs);
> _self_._setColumnAttributes('lfcolor', inColAttribs); rc5 = dellist
> (inColAttribs); put rc1= rc2= rc3= rc4= rc5=;
> And I get the following error for each _setColumnAttributes method:
> ERROR: [Line 48] Unknown method _setColumnAttributes for
> I didn't see the _setColumnAttributes method in the properties window for
> the the data model or the table viewer. The inColAttribs list indicates
> that the attributes are being changed in the list, I just can't find the
> method to set them in the view table.
> _setViewerAttribute doesn't work, label colors are not listed as an
> attribute that can be set.
> Do you know of any other way of doing this?
> Thanks for your help.