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 (January 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Jan 2008 11:09:37 -0500
Reply-To:     Randy Herbison <RandyHerbison@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Randy Herbison <RandyHerbison@WESTAT.COM>
Subject:      Re: SAS/AF Tree View Control - New Method: selectNode
Comments: To: Paul Walker <walker.627@OSU.EDU>
In-Reply-To:  <200801030057.m02HlfGK002845@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Paul,

You should be able to see the node switch to reverse video (dark BG color, light FG color) even if the node uses the same icon for Open and Closed.

When I try it, the only time the node doesn't switch to reverse video is when it has children and it is already expanded. If it has children and is not expanded, it expands and switches to reverse video (or remains in reverse video if already in that mode). If the node doesn't have children, it switches to reverse video (or remains in reverse video if already in that mode).

-Randy

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of Paul Walker Sent: Wednesday, January 02, 2008 7:57 PM To: SAS-L@LISTSERV.UGA.EDU; Randy Herbison Subject: Re: SAS/AF Tree View Control - New Method: selectNode

Randy,

I think I understand what was happening. Your code does work. However, it did not produce the results I was expecting exactly. When a node is "selected" it is not necessarily shown with "dark background white text" while everything else is shown in "white background black text" which is what I originally had in mind. Instead, the iconOpen icon is displayed while every other node displays the iconClosed icon. The problem I had was that iconOpen and iconClosed were set to the same icon, so I could not see any results from running the new method. Once I changed the iconOpen to something different, it works, i.e. a different icon is displayed when the method is run! That is not exactly what I had in mind (wanted "dark background white text") but it will serve the purpose in my application, which is showing the user where along the tree they are when navigating through the multiple screens.

Thank you yet again Randy (& Richard) for your help with AF! I'll let you know if the SAS tech support track I opened for this issue yields any additional tricks.

- Paul

On Wed, 2 Jan 2008 16:55:29 -0500, Randy Herbison <RandyHerbison@WESTAT.COM> wrote:

>Paul, > >I'm using SAS 9.1 with the experimental version of the treeview control

>(as far as I know, the treeview control, as well as the dual-selector >control, is production in 9.2, but the listview control remains >experimental). > >Did you declare the find node as a node or object type? _expand() >should work with or without child nodes. > >Here's my working code: > >dcl sashelp.classes.treenode_c.class foundNode rootNode; > >findNselectNode: method text:input:char(500); > > * Get the identifier of the root node; _self_._getRoot(rootNode); > > * Search for the text string; > _self_._find(rootNode,text,0,0,foundNode); > > * Select the found node; > _self_.selectedNode=foundNode; > > * Make the selected node appear selected; foundNode._expand(); > > * Prevent compile time message that _self_ is uninitialized; _self_

> = _self_ ; > >endmethod; > >-Randy > > >-----Original Message----- >From: Paul Walker [mailto:walker.627@OSU.EDU] >Sent: Wednesday, January 02, 2008 4:18 PM >To: SAS-L@LISTSERV.UGA.EDU; Randy Herbison >Subject: Re: SAS/AF Tree View Control - New Method: selectNode > > >Randy, > >The _expand() method did not work. Are you running the experimental >(9.1) version of TreeView or the production (9.2) version? I'm >wondering if that is causing the difference per Richard's comments. > >Or the fact the node does not have any children. Maybe I will add some

>children to the node and then using _expand() to see if that works. > >Paul


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