From: montura on
This can only be done with the labels row.
Add this to the SAS dataset Model class.

All other rows can only be adjusted by changing the font. The height
and width of SAS Frame changes due to the aspect ratio of the Unix X-
window emulator. You will be better off getting the unix or windows
Admin to fix that configuration first.

_getColumnDimInfo: method coladdr:list
elements subdim height:num
units:char
grouplst:list
eod:char / (state='o');

_super(coladdr, elements, subdim, height, units, grouplst, eod);

units='pt';
height=16;
endmethod;
From: Randy Herbison on
Make sure the growRowsToFillTable attribute is set to "No".

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Paul Walker
Sent: Thursday, December 03, 2009 12:26 PM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: SAS/AF: Adjust Row Height in Table Viewer

Is it possible to adjust the row height either for specific rows or for
all rows in a table viewer?

The current behavior is that row heights are established automatically
according to the contents in the cells of that row. However, on UNIX this
sizing is not done very accurately, and the row height is much larger than
it need be. I would like to set a reduced row height for some rows, or a
uniform row height for all the rows. Is this possible?

I could not find any attribute or method of the table viewer which
controlled the row height.
From: Paul Walker on
It was already set to "No". Any other ideas?


On Thu, 3 Dec 2009 13:34:27 -0500, Randy Herbison
<RandyHerbison(a)WESTAT.COM> wrote:

>Make sure the growRowsToFillTable attribute is set to "No".
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Paul
Walker
>Sent: Thursday, December 03, 2009 12:26 PM
>To: SAS-L(a)LISTSERV.UGA.EDU
>Subject: SAS/AF: Adjust Row Height in Table Viewer
>
>Is it possible to adjust the row height either for specific rows or for
>all rows in a table viewer?
>
>The current behavior is that row heights are established automatically
>according to the contents in the cells of that row. However, on UNIX this
>sizing is not done very accurately, and the row height is much larger than
>it need be. I would like to set a reduced row height for some rows, or a
>uniform row height for all the rows. Is this possible?
>
>I could not find any attribute or method of the table viewer which
>controlled the row height.
From: Randy Herbison on
If the X-window emulator isn't the problem, try the tableViewer's _setDataMargin() method:

tableViewer._setDataMargin('TOP',1,'pt');
tableViewer._setDataMargin('BOTTOM',1,'pt');

You can use other units.
________________________________________
From: Paul Walker [walker.627(a)OSU.EDU]
Sent: Thursday, December 03, 2009 2:47 PM
To: SAS-L(a)LISTSERV.UGA.EDU; Randy Herbison
Subject: Re: SAS/AF: Adjust Row Height in Table Viewer

It was already set to "No". Any other ideas?


On Thu, 3 Dec 2009 13:34:27 -0500, Randy Herbison
<RandyHerbison(a)WESTAT.COM> wrote:

>Make sure the growRowsToFillTable attribute is set to "No".
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Paul
Walker
>Sent: Thursday, December 03, 2009 12:26 PM
>To: SAS-L(a)LISTSERV.UGA.EDU
>Subject: SAS/AF: Adjust Row Height in Table Viewer
>
>Is it possible to adjust the row height either for specific rows or for
>all rows in a table viewer?
>
>The current behavior is that row heights are established automatically
>according to the contents in the cells of that row. However, on UNIX this
>sizing is not done very accurately, and the row height is much larger than
>it need be. I would like to set a reduced row height for some rows, or a
>uniform row height for all the rows. Is this possible?
>
>I could not find any attribute or method of the table viewer which
>controlled the row height.
From: Joe Whitehurst on
This is a very nicely constructed teaching lesson! Merry Christmas!

On Tue, Dec 22, 2009 at 5:05 PM, Richard A. DeVenezia
<rdevenezia(a)gmail.com>wrote:

> > >-----Original Message-----
> > >From: SAS(r) Discussion [mailto:SA...(a)LISTSERV.UGA.EDU] On Behalf Of
> Paul
> > Walker
> > >Sent: Thursday, December 03, 2009 12:26 PM
> > >To: SA...(a)LISTSERV.UGA.EDU
> > >Subject: SAS/AF: Adjust Row Height in Table Viewer
> >
> > >Is it possible to adjust the row height either for specific rows or for
> > >all rows in a table viewer?
> >
> > >The current behavior is that row heights are established automatically
> > >according to the contents in the cells of that row. However, on UNIX
> this
> > >sizing is not done very accurately, and the row height is much larger
> than
> > >it need be. I would like to set a reduced row height for some rows, or
> a
> > >uniform row height for all the rows. Is this possible?
> >
> > >I could not find any attribute or method of the table viewer which
> > >controlled the row height.- Hide quoted text -
>
> Paul:
>
> For this discussion, class names as found in the help files are
> doubled quoted to separate them from surrounding text.
>
> The "Table Viewer Control" is used to render information provided by
> and according to an attached "Data Model".
> The "SAS Data Set Model" is one such model that is most often used,
> and the attachment is made at build time by dropping the model
> component onto a table viewer.
>
> The "SAS Data Set Model" is a realizing subclass of the abstract class
> "Data Model".
> "Data Model" has the interface "Data Model Interface". The interface
> is a list of methods that a realizing subclass must implement.
>
> Amongst the methods in the "Data Model Interface" is "_getRowInfo".
> _getRowInfo is utilized by the table viewer (or perhaps its
> controller) to obtain (from the model) information about the row it is
> rendering.
> The information is passed by way of a "Row/Column Data Vector
> Class" (rcdvec) argument.
>
> The rcdvec stores a wide variety of context and content (position,
> format and display) parameter settings. If you read the docs it looks
> like many of the parameters are the same ones that can be set in
> ModelSCL via the "SAS Data Set Model" _SetViewerAttribute method.
> Unfortunately, not all rcdvec parameters are surfaced by the method.
>
> So, somewhere in the proprietary bowels of the table viewer & data
> model system a call
> <data-model>._getRowInfo ( <rcdvecid> )
> occurs.
>
> Your mission is to override the data models _getRowInfo and force it
> to perform the row height adjustment you want.
>
> In this sample, the adjustment is to make every fifth row one inch
> high.
>
> Consider a frame with a Table Viewer and attached Data Model.
>
> In the frame SCL init section override the data models _getRowInfo
>
> ------ mylib.mycat.myframe.scl -----
> init:
> sasdataset1._setInstanceMethod
> ( '_getRowInfo' /* method to override */
> , 'mylib.mycat.myoverrides.scl' /* override scl entry */
> , 'getRowInfo' /* override method name */
> );
> return;
> ---------------------------
>
> In a separate SCL place the override code (be sure to compile the SCL)
> ----- mylib.mycat.myoverrides.scl -----
> declare sashelp.classes.datamodel_c _self_ = _self_;
> declare char _method_ = _method_;
>
> /* Override of _getRowInfo */
>
> getrowinfo:
>
> method o_rcdvec:input:sashelp.fsp.rcdvec.class;
>
> * ensure default behaviour;
>
> call super(_SELF_,_method_,o_rcdvec);
>
> /* _getCoordinates returns the row dimension indices
> * because this is _getRowInfo override
> *
> * in a plain table a row is 1-dimensional, so coords will have
> listlen 1
> * in a mddb table a row is n-dimensional, so coords would have
> listlen n
> */
>
> declare list coords = {};
>
> o_rcdvec._getCoordinates_(coords);
>
> rownum = getitemn(coords,1);
> coords = dellist (coords);
>
> /* conditionally tweak the row height */
>
> if mod(rownum,5) = 0 then
> o_rcdvec._setDimension(1.0,'in');
>
> endmethod;
> ---------------------------
>
>
> Richard A. DeVenezia
> http://www.devenezia.com
>