OK - so I am now able to reproduce this wierdness.

In the keydownTest event in the listbox on w1 add this

w2.show

run the app.

In the listbox on w1, press a key. the keydownTest event occurs from the listbox on w1 as expected

but...

the keydown event in the listbox on w2 also fires (and every other instance of the lbMaster listbox on any other windows you may have open)


Is this correct behavior?

I was under the impression that any code you put in an event in an instance of a control was specific to that control.

And why would a w2.show send the event to the instance of the control on w2?

- Jay

On Mar 25, 2006, at 5:08 PM, Jay Wooten wrote:

How can event in an instance of a control class get passed to other instances of that control?

Let me set this up.

I have a master Listbox class called lbMaster. I have some code in the CellBackgroundPaintEvent to color ever other line - which is not related to the issue.

In the keydown event of lbMaster I have this

  return keydownTest( key )

(yes, I know, raise event should be used - just haven't got there yet)

and have added a keydowntTest event to it - which shows up in the instances of lbMaster



I have an instance of this control in two different windows, w1 and w2


In the Keydown Event in the listbox on w2, I have

msgbox "why is this?"

I run the app. I click on the listbox in w1 and press a key.

Msgbox "why is this?"  (from the listbox on w2)

appears.

I have not been able to duplicate the issue on a small scale yet..

So the question is...


How can an event in the instance of a control also be sent to other instances of that control on other windows

i.e. press a key in the listbox on w1 and have that event also show up in the listbox on w2

Does that make any sense? is it even answerable?




Jay Wooten, President
Visual Dynamics, Inc.  -  Authorized Apple Specialist
www.visdyninc.com
321-773-7788 w
321-773-9604 f
----------------
Everything is easier on a Mac!
----------------

Mac OS 10.4.5


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to