Re: Prima::MDI how to get reference to active child window

From: Dmitry Karasik <dmitry_at_karasik.eu.org>
Date: Tue, 15 Apr 2008 21:41:45 +0200
To: "David Christensen" <dpchrist_at_holgerdanske.com>

        Hi David!

On 14 Сав 08 at 06:28, "David" (David Christensen) wrote:

 David> How do I get a reference to the active child from the
 David> point of view of the parent?

There is no such thing as active window for MDIs. Technically,
active window is a window that either itself, or one of its
children has the focus. However, when the main MDI container
window doesn't have the focus itself, the meaning of active
MDI window is lost. You can try "currentWidget" property instead, that
points to the immediate child that either has the focus now,
or will have it when the parent becomes focused. Note that
this property won't necessarly point to an MDI window.

Another approach would be to write a function that traverses
Z-order, getting to the topmost MDI window. See in MDI.pm,
on_translateaccel, lines 774-778, how searching for the
next or previous MDI window in the window stack is implemented.

-- 
Sincerely,
	Dmitry Karasik
Received on Tue 15 Apr 2008 - 21:41:48 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET