Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

List of controls in a window

6 posts in Objects Last posting was on 2008-05-09 14:55:56.0Z
Gwydion Posted on 2008-05-07 12:26:29.0Z
From: Gwydion <gwydion@oletros.info>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: List of controls in a window
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48219ff5@forums-1-dub>
Date: 7 May 2008 05:26:29 -0700
X-Trace: forums-1-dub 1210163189 10.22.241.152 (7 May 2008 05:26:29 -0700)
X-Original-Trace: 7 May 2008 05:26:29 -0700, vip152.sybase.com
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9678
Article PK: 736827

How can I make a list of all the controls in a window in a recursive way
to list controls in tabpages, etc.?


Bruce Armstrong [TeamSybase] Posted on 2008-05-07 13:30:11.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: List of controls in a window
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <6lb324dcnhpm22uqs82db19mv4s22tu8jg@4ax.com>
References: <48219ff5@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 7 May 2008 06:30:11 -0700
X-Trace: forums-1-dub 1210167011 10.22.241.152 (7 May 2008 06:30:11 -0700)
X-Original-Trace: 7 May 2008 06:30:11 -0700, vip152.sybase.com
Lines: 11
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9679
Article PK: 736818

Look at the control[] property of the window and loop through that.
When you hit a tab, you'll have to look though the tabpages. The tab
controls control array only references the statically created
tabpages, not any that you might have dynamically created later.

On 7 May 2008 05:26:29 -0700, Gwydion <gwydion@oletros.info> wrote:

>How can I make a list of all the controls in a window in a recursive way
>to list controls in tabpages, etc.?


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-05-07 14:49:02.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: List of controls in a window
References: <48219ff5@forums-1-dub> <6lb324dcnhpm22uqs82db19mv4s22tu8jg@4ax.com>
In-Reply-To: <6lb324dcnhpm22uqs82db19mv4s22tu8jg@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4821c15e$1@forums-1-dub>
Date: 7 May 2008 07:49:02 -0700
X-Trace: forums-1-dub 1210171742 10.22.241.152 (7 May 2008 07:49:02 -0700)
X-Original-Trace: 7 May 2008 07:49:02 -0700, vip152.sybase.com
Lines: 29
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9680
Article PK: 736819

Also, custom visual user objects have their own control[] array, just
like tab controls.

Bruce Armstrong [TeamSybase] wrote:
> Look at the control[] property of the window and loop through that.
> When you hit a tab, you'll have to look though the tabpages. The tab
> controls control array only references the statically created
> tabpages, not any that you might have dynamically created later.
>
> On 7 May 2008 05:26:29 -0700, Gwydion <gwydion@oletros.info> wrote:
>
>> How can I make a list of all the controls in a window in a recursive way
>> to list controls in tabpages, etc.?
>

--
Off topic:
Sybase has been reviewing NNTP availability and is looking at
alternative ways to build a user community. As a test-bed /
proof-of-concept, I have personally created a community on Ning
(http://powerbuilder.ning.com). While Ning certainly doesn't offer all
of the features that I'd like to see Sybase eventually implement, I am
trying to foster some community involvement on that site. Several of the
TeamSybase members have joined already and are available to answer
questions there.

Please sign up; give it a try. My hope is that it evolves into more than
just a Q&A database, but it won't get there without your participation.


Gwydion Posted on 2008-05-07 15:09:14.0Z
From: Gwydion <gwydion@oletros.info>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: List of controls in a window
References: <48219ff5@forums-1-dub>
In-Reply-To: <48219ff5@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4821c61a@forums-1-dub>
Date: 7 May 2008 08:09:14 -0700
X-Trace: forums-1-dub 1210172954 10.22.241.152 (7 May 2008 08:09:14 -0700)
X-Original-Trace: 7 May 2008 08:09:14 -0700, vip152.sybase.com
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9681
Article PK: 736820


Gwydion wrote:
> How can I make a list of all the controls in a window in a recursive way
> to list controls in tabpages, etc.?

Well, I have done it using classdefinition and nestedclasslist doing
recursive calls and now I have a list of string like:

uv_peritajes`tab_1`tpg_historico`dw_data

I would like to set or unset properties like visible or enabled using as
start point those strings. Could it be done?


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-05-07 16:55:09.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: List of controls in a window
References: <48219ff5@forums-1-dub> <4821c61a@forums-1-dub>
In-Reply-To: <4821c61a@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4821deed$1@forums-1-dub>
Date: 7 May 2008 09:55:09 -0700
X-Trace: forums-1-dub 1210179309 10.22.241.152 (7 May 2008 09:55:09 -0700)
X-Original-Trace: 7 May 2008 09:55:09 -0700, vip152.sybase.com
Lines: 31
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9682
Article PK: 736821

Using ClassDefinition, you get the class names. Using the Control[]
array, you get actual valid references to the objects. With valid
references to objects, you can manipulate object properties at will.

Gwydion wrote:
> Gwydion wrote:
>> How can I make a list of all the controls in a window in a recursive
>> way to list controls in tabpages, etc.?
>
> Well, I have done it using classdefinition and nestedclasslist doing
> recursive calls and now I have a list of string like:
>
> uv_peritajes`tab_1`tpg_historico`dw_data
>
> I would like to set or unset properties like visible or enabled using as
> start point those strings. Could it be done?

--
Off topic:
Sybase has been reviewing NNTP availability and is looking at
alternative ways to build a user community. As a test-bed /
proof-of-concept, I have personally created a community on Ning
(http://powerbuilder.ning.com). While Ning certainly doesn't offer all
of the features that I'd like to see Sybase eventually implement, I am
trying to foster some community involvement on that site. Several of the
TeamSybase members have joined already and are available to answer
questions there.

Please sign up; give it a try. My hope is that it evolves into more than
just a Q&A database, but it won't get there without your participation.


Jeremy Lakeman Posted on 2008-05-09 14:55:56.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: List of controls in a window
References: <48219ff5@forums-1-dub> <4821c61a@forums-1-dub>
In-Reply-To: <4821c61a@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <482465fc@forums-1-dub>
Date: 9 May 2008 07:55:56 -0700
X-Trace: forums-1-dub 1210344956 10.22.241.152 (9 May 2008 07:55:56 -0700)
X-Original-Trace: 9 May 2008 07:55:56 -0700, vip152.sybase.com
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9683
Article PK: 736822


Gwydion wrote:
> Gwydion wrote:
>> How can I make a list of all the controls in a window in a recursive
>> way to list controls in tabpages, etc.?
>
> Well, I have done it using classdefinition and nestedclasslist doing
> recursive calls and now I have a list of string like:
>
> uv_peritajes`tab_1`tpg_historico`dw_data
>
> I would like to set or unset properties like visible or enabled using as
> start point those strings. Could it be done?

The control array is just a bunch of windowobject variables, which
doesn't let you do much more than hide and move things arround. So
first, work out what type each object is, assign it to a variable of
that class and then you can modify any other properties, call events or
functions, that are specific to that class. For example;

for ll_i = lowerbound(control) to upperbound(control)
choose case typeof(control[ll_i])
case commandbutton!
lcb = control[ll_i]
lcb.enabled = false
...
end choose
next