I wasn't clear.
1) Open New Project
2) Add a class, Set its super to Listbox, name it lbMaster
3) In the lbMaster Class add the following code to the KeyDown event

return MyKeyDown(key)

4) Add an event to the lbMaster class called MyKeyDown
Parameters:  key as String
Return Type:  Boolean

5) Add another window to the project. name the default window w1 and the new window w2

6) In the open event of the app add the following code

w1.show
w2.show
w2.left = w1.left + w1.Width + 20 'put the windows side by side

7) Open w1 and drag the lbMaster class to the window, call it lb1
   in the keydown event of the lb1, add the following code

   w2.show

8) Open w2 and drag the lbMaster class to the window, call it lb2
   in the keydown event of lb2, add the following code
   msgBox "This is an event in w2, lb2"

9) run the app. it should start up with w1 in front and lb1 with the focus


10) Type a key. The msgbox from lb2 displays.







On Mar 25, 2006, at 6:54 PM, Karen wrote:


On Mar 25, 2006, at 6:11 PM, Jay Wooten wrote:


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)

If I understand what you are saying, I can't reproduce it. here is what i Did:

1) New project
2) New Class1:
   Super = ListBox
   New Event MyKeyDown(Key as String)
   in Keydown event:
     MyKeyDown(key)
     Return True
3) Put Listbox in Window2 and set super to Class1
4) In the MyKeyDown Event put:
    Me.AddRow Key

5) In App.Open put:
  Dim W as Window

  W = New Window1
  w.Show

  W = New Window1
  w.Show

6) Run then  type a letter

As expected it only appears in the front most window where the listbox has the focus.

OSX 10.4.5 PPC

- Karen


_______________________________________________
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