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.

How can I iterate over the windows inside a mdiclient?

4 posts in Powerscript Last posting was on 2010-03-30 21:33:06.0Z
Frerich Raabe Posted on 2010-03-29 11:10:11.0Z
Sender: 73bb.4bb089c1.1804289383@sybase.com
From: Frerich Raabe
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: How can I iterate over the windows inside a mdiclient?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4bb08a93.73dc.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 29 Mar 2010 03:10:11 -0800
X-Trace: forums-1-dub 1269861011 10.22.241.41 (29 Mar 2010 03:10:11 -0800)
X-Original-Trace: 29 Mar 2010 03:10:11 -0800, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27365
Article PK: 761827

Hi,

my application contains an mdiclient control within which
various windows are displayed. I'd like to iterate over all
these windows and print the caption (and the geometry, if
possible) for each window inside the mdiclient control. Does
anybody know how to do this?

So far, I've been using the 'Control' array to do such
iterations (over the children of Window, UserObject or Tab
objects). However, there's no such property for mdiclient
windows. I couldn't find functions like
GetFirstSheet()/GetNextSheet() (which are available on
Window objects) either, so I'm running out of ideas.

Can anybody shed some light on whether it's possible to do
this?

Regards,

- Frerich


Roland Smith [TeamSybase] Posted on 2010-03-29 11:47:42.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4bb08a93.73dc.1681692777@sybase.com>
Subject: Re: How can I iterate over the windows inside a mdiclient?
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4bb0935e@forums-1-dub>
Date: 29 Mar 2010 03:47:42 -0800
X-Trace: forums-1-dub 1269863262 10.22.241.152 (29 Mar 2010 03:47:42 -0800)
X-Original-Trace: 29 Mar 2010 03:47:42 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27366
Article PK: 761828

Huh?

First you say you want to iterate windows in a mdiclient and then in the
next paragraph you say you can't use GetFirstSheet/GetNextSheet because they
only work on windows. So are they windows or controls?

<Frerich Raabe> wrote in message news:4bb08a93.73dc.1681692777@sybase.com...
> Hi,
>
> my application contains an mdiclient control within which
> various windows are displayed. I'd like to iterate over all
> these windows and print the caption (and the geometry, if
> possible) for each window inside the mdiclient control. Does
> anybody know how to do this?
>
> So far, I've been using the 'Control' array to do such
> iterations (over the children of Window, UserObject or Tab
> objects). However, there's no such property for mdiclient
> windows. I couldn't find functions like
> GetFirstSheet()/GetNextSheet() (which are available on
> Window objects) either, so I'm running out of ideas.
>
> Can anybody shed some light on whether it's possible to do
> this?
>
> Regards,
>
> - Frerich


Frerich Raabe Posted on 2010-03-29 12:15:53.0Z
Sender: 76ca.4bb0993d.1804289383@sybase.com
From: Frerich Raabe
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How can I iterate over the windows inside a mdiclient?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4bb099f9.76df.1681692777@sybase.com>
References: <4bb0935e@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 29 Mar 2010 04:15:53 -0800
X-Trace: forums-1-dub 1269864953 10.22.241.41 (29 Mar 2010 04:15:53 -0800)
X-Original-Trace: 29 Mar 2010 04:15:53 -0800, 10.22.241.41
Lines: 19
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27367
Article PK: 793713


> Huh?
>
> First you say you want to iterate windows in a mdiclient
> and then in the next paragraph you say you can't use
> GetFirstSheet/GetNextSheet because they only work on
> windows. So are they windows or controls?

Ah, I apologize for the confusion. What I meant is that an
mdiclient object (which is usually called mdi_1 as far as I
can see) doesn't seem to offer any way to iterate over the
contained sheets.

However, the *parent* of an mdiclient object appears to be a
window in most (all?) cases. I can then call
GetFirstSheet/GetNextSheet on that (read: the parent of the
mdiclient, not the mdiclient itself) to iterate over the
windows. Does that sound like a reasonable approach?

- Frerich


Chris Pollach Posted on 2010-03-30 21:33:06.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4bb0935e@forums-1-dub> <4bb099f9.76df.1681692777@sybase.com>
In-Reply-To: <4bb099f9.76df.1681692777@sybase.com>
Subject: Re: How can I iterate over the windows inside a mdiclient?
Lines: 2
Organization: STD Inc.
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4bb26e12@forums-1-dub>
Date: 30 Mar 2010 13:33:06 -0800
X-Trace: forums-1-dub 1269984786 10.22.241.152 (30 Mar 2010 13:33:06 -0800)
X-Original-Trace: 30 Mar 2010 13:33:06 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27368
Article PK: 793714

Hi Frederich;

That is because MDI_1 does not own any window object classes. It merely
reserves a work area for the O/S to manage the drawing of the MDI_Child (or
what PB calls a sheet) windows. The only way (without SDK calls) to traverse
these windows from the frame is with the GetFirst/NextSheet ( ) commands.


HTH

--

Regards ... Chris
President: STD Inc.
ISUG - Communications Director
http://chrispollach.pbdjmagazine.com

"Frerich Raabe" wrote in message news:4bb099f9.76df.1681692777@sybase.com...
>> Huh?
>>
>> First you say you want to iterate windows in a mdiclient
>> and then in the next paragraph you say you can't use
>> GetFirstSheet/GetNextSheet because they only work on
>> windows. So are they windows or controls?
>
> Ah, I apologize for the confusion. What I meant is that an
> mdiclient object (which is usually called mdi_1 as far as I
> can see) doesn't seem to offer any way to iterate over the
> contained sheets.
>
> However, the *parent* of an mdiclient object appears to be a
> window in most (all?) cases. I can then call
> GetFirstSheet/GetNextSheet on that (read: the parent of the
> mdiclient, not the mdiclient itself) to iterate over the
> windows. Does that sound like a reasonable approach?
>
> - Frerich