Date: Fri, 12 Nov 2004 07:25:06 -0800
Reply-To: m n <iced_phoenix_news@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: m n <iced_phoenix_news@YAHOO.COM>
Subject: Re: SAS/AF: Create Widgets Programmatically
In-Reply-To: <438F6013067F9A40B8260C1AD2C29F3902A4FFF2@remail1.westat.com>
Content-Type: text/plain; charset=us-ascii
Randy,
Thanks a lot for the information--I see similar code
in the doco for the _neo_ statement, which I was
overlooking in favor of the _new_ statement. However,
I can't find documentation that *explains* what's
happening here. Evidently, the attr list is being
passed to the _init() method. However, where is the
documentation that explains what that attr list should
contain? In other words, what is the structure /
semantics of the required attr list, and where is it
documented?
Thanks!
Matt
--- Randy Herbison <RandyHerbison@westat.com> wrote:
> Matt,
>
> You can:
>
> 1. Use a _region_ list to store the region
> coordinates for the spinbox.
> 2. Insert the _region_ list into an attribute list.
> 3. Specify the attribute list as an argument to the
> _NEO_ operator.
>
> import sashelp.classes;
> dcl list attr={} region={};
> dcl spinbox_c myspin;
> dcl num rc;
>
> startcol=5;
> startrow=5;
>
> rc = setniteml(attr, region, '_region_');
> rc = setnitemn(region, startcol, 'ulx');
> rc = setnitemn(region, startrow, 'uly');
>
> myspin = _neo_ spinbox_c(attr);
>
> rc=dellist(attr,'y');
>
>
>
> RandyHerbison@westat.com
>
> -----Original Message-----
> From: SAS(r) Discussion
> [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of m n
> Sent: Thursday, November 11, 2004 12:24 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: SAS/AF: Create Widgets Programmatically
>
>
> Dear SAS-L,
>
> I know I can create a new widget object
> programmatically using the _new_ statement in SCL,
> as
> in:
>
> import sashelp.classes;
> dcl spinbox_c myspin = _new_ spinbox_c();
>
> Suppose the above code is in the handler for a push
> button, so that when that button is pressed, I want
> a
> new spin box to appear at a certain location in the
> frame. Instead, what happens is that I get a hand
> icon and a dotted box, asking me to place the spin
> box
> during run-time.
>
> After creating the spinbox object, I've set the
> position and size attributes, but that does not
> automatically place the object. Thus, my question
> is:
> how do I automatically "drop" the new object without
> the user needing to place it him/herself?
>
> The _refresh() and _update() methods have no effect.
>
> Thanks!
> Matt
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
|