Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Discovering which dw has focus

582 views
Skip to first unread message

Woody Splawn

unread,
Nov 25, 1997, 3:00:00 AM11/25/97
to

I have a window with two datawindows in it. I have a button with some
code it it. When I select the botton, I would like to identify which
dw the user was on before selecting the button so I can return there
after the code is run.

The problem is that by the time the code in the cliked event of the
button is reached, the active dw has already lost focus and I
therefore do not know how to identify it.

Could someone help me with this?


Woody Splawn

James Woodger

unread,
Nov 25, 1997, 3:00:00 AM11/25/97
to

I've seen this handled in a primitive manner: by keeping an instance
variable which indicates the "latest" DW. Each time a DataWindow
gets/loses focus, the instance variable is updated.

Working with sheets (and using toolbars instead of command buttons) is
another way of avoiding this problem.
----------------

Prasad Paruchuri

unread,
Nov 27, 1997, 3:00:00 AM11/27/97
to

Woody Splawn wrote:
>
> I have a window with two datawindows in it. I have a button with some
> code it it. When I select the botton, I would like to identify which
> dw the user was on before selecting the button so I can return there
> after the code is run.
>
> The problem is that by the time the code in the cliked event of the
> button is reached, the active dw has already lost focus and I
> therefore do not know how to identify it.
>
> Could someone help me with this?
>
> Woody Splawn
Hi Woody:

Try GetFocus() Function. Read Help and the code example for this
function

Hope this helps
Prasad Paruchuri

Woody Splawn

unread,
Dec 2, 1997, 3:00:00 AM12/2/97
to

Prasad

Thank you for responding.



<<Try GetFocus() Function. Read Help and the code example for this

function.>>

I understand what your saying but that's the problem. With
the code on a button, your focus is on the button and the object you
were on has lost focus.


Woody Splawn

0 new messages