LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 3 Aug 1997 00:56:18 -0400
Reply-To:   Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Subject:   Re: SASTip: Splitting column titles -- Extra Info
Content-Type:   text/plain; charset=us-ascii

Don Stanley wrote: > > You know, I find this pompous school teacherish 'i wish you had' > attitude a bit negative. As it happens I just did a dejanews search thru > current and old databases and found nothing. The solution was > incidentally 'right there' at 0700 on Saturday morning after I tracked > it at 2300 on Friday night, usual brilliant Cary FRAME tech support. I > lost no time at all. > > I'm curious though after using this news group for 3 years how I managed > to miss the mentioned post. I usually religiously print out the FRAME > related ones. Can anyone who might have saved the post mentioned below > please forward it to me. > > All my post was doing was pointing out something that other people might > find useful as an add on to Phil's tip.

Hey man,

Further to your message here as well as the private email you sent me, I was simply pointing out that this item was covered and it was too bad you went through the hassles you mentioned the day previous to Phil's message.

Rest assured you did not offend me by giving out additional details. You expressed your dissatisfaction and I mentioned it was too bad you did not do a dejanews search. If that is pompous to you, I will make sure I do not offer any feedback on any of your future postings.

You mention that your solution was right there eight hours following your initial contact with Cary ... well, you left a very different tone in your original message.

Now, I have the message I referred to in my original message ... however, I am sure that someone else who is not as pompous as I am will be glad to pass it on.

Best wishes.

Anthony.

> > Don > > Anthony Ayiomamitis wrote: > > > > Don, > > > > I don't mean to add salt to the wound but exactly the issue was > > raised a few months ago by Harm Schipper <HarmSchipper@compuserve.com>. > > I wish you had used DEJANEWS or something and the solution would have > > been right there ... > > > > Anthony. > > > > Don Stanley wrote: > > > > > > Phil .... your timing is pathetic. One day earlier and I wouldn't have > > > had to raise an Emits problem with SAS and had the almost identical > > > solution sent back!! > > > > > > However, you need to be aware that IF you define your dataset in data > > > table attributes this solution must include the call to the > > > _set_dataset_ method in INIT, but after the instance method definition. > > > > > > If you define your dataset in the data table attributes, this code for > > > splitting labels will not work without an open of the table in INIT. You > > > will also need a close before hand. > > > > > > The reason is that _get_column_dim_info_ executes only when the dataset > > > is opened in the table and that is BEFORE you define the instance method > > > overrides unless you re-open, since the data table initialised before > > > the FRAME INIT section runs. > > > > > > so i use ... > > > > > > call notify('.','_get_widget_','libnames',lib_table) > > > ; > > > modelid = getnitemn(lib_table,'dataid') > > > ; > > > > > > call > > > send(modelid,'_set_instance_method_','_get_column_dim_info_', > > > 'sashelp.thing.methods.scl','coldim') > > > ; > > > > > > call > > > send(modelid,'_set_instance_method_','_get_column_info_', > > > 'sashelp.thing.methods.scl','colinfo') > > > ; > > > > > > call notify('libnames','_set_dataset_',' ') > > > ; > > > call notify('libnames','_set_dataset_','sashelp.vslib') ; > > > > > > BTW, sashelp.thing represents the thing I'm writing right now really > > > well! > > > > > > Don > > > > > > Philip Mason wrote: > > > > > > > > When using a data table widget (SAS 6.12) with variable labels as column > > > > titles, they are (by default) not split over several lines. This means that > > > > if you have a long label, it will result in a very wide column - thus > > > > wasting space. > > > > > > > > However by overriding 2 methods (_get_column_dim_info_ & _get_column_info_) > > > > you can change the behaviour of the table to split labels over several > > > > lines, splitting on a specified character. > > > > > > > > This can also be enhanced to automatically insert split characters to split > > > > labels over a specified number of lines (code not shown here - ask me if > > > > you want it). > > > > > > > > For more information see the "SAS: Solutions @ Work" CD. > > > > > > > > ===> Example code: > > > > > > > > ---> Make a frame with a Data Table widget called TABEL, then use this SCL > > > > Code: > > > > > > > > init: > > > > call notify('table', '_set_dataset_', 'sasuser.houses') ; > > > > call notify('table', '_display_column_label_', '_all_') ; > > > > > > > > * Get object id for table ; > > > > call notify('.', '_get_widget_', 'table', tableid) ; > > > > > > > > * Get id of data model ; > > > > modelid=getnitemn(tableid, 'dataid') ; > > > > > > > > * Override methods ; > > > > call send(modelid, '_set_instance_method_', '_get_column_dim_info_', > > > > 'sasuser.test.methods.scl', 'colinfd') ; > > > > call send(modelid, '_set_instance_method_', '_get_column_info_', > > > > 'sasuser.test.methods.scl', 'colinfo') ; > > > > return ; > > > > > > > > ---> Create METHODS.SCL, put the following code into it: > > > > > > > > _self_=_self_ ; > > > > > > > > colinfd: > > > > method addr 8 > > > > elements 8 > > > > subdim 8 > > > > height 8 > > > > units $ > > > > gl 8 > > > > unused $ ; > > > > call super(_self_, '_get_column_dim_info_', addr, elements, > > > > subdim, height, units, gl, unused) ; > > > > if listlen(addr)=0 then > > > > units='fit' ; > > > > endmethod ; > > > > > > > > colinfo: > > > > method rcdvec 8 ; > > > > * Get row/column data vector id ; > > > > call super(_self_, '_get_column_info_', rcdvec) ; > > > > * Define character to use for wrapping - space in this case ; > > > > call send(rcdvec, '_set_wrapping_', 'y', ' ') ; > > > > * Set vertical justification ; > > > > call send(rcdvec, '_set_vjust_', 'top') ; > > > > *** Could add some code here to use _GET_TEXT_ to examine the label and > > > > insert split characters at appropriate places ; > > > > endmethod ; > > > > > > > > Philip Mason >


Back to: Top of message | Previous page | Main SAS-L page