Going Crazy (TreeView)

jongpau

Member
Hi All,

I am going crazy here, so I could do with some help to restore (at least part of) my sanity.

I have a Window with a coulpe of frames in it. In one of those frames I have a TreeView Control (MS TreeView Control (version 6), mscomctl.ocx). The TreeView Control holds the menu for the user.

All works just fine, EXCEPT (I'll do this in steps):
- I double click a node in the TreeView that represents a program
- A separate internal procedure (called from the dblclick event procedure of the TreeView) runs the program persistent
- Program runs, and creates its own window. This window lays on top of the one that holds the TreeView
- As soon as I use the mouse to click anywhere in this new window, the new window is moved behind the window with the TreeView and the TreeView control gets focus - GRRRRR :mad:
- If I bring the new window back to the foreground, everything works fine.

Note that this problem only appears to occur when I click in the new window with the mouse. Keyboard actions do not seem to have the described effect.

I have tried several things to solve this (setting focus to another - Progress widget, return error, return no-apply, pulling my hair out, banging my head on the keyboard, etc), all to no avail.

The real "funny" thing is that when I press the ENTER key on the TreeView, the same DblClick event procedure is called and the problem does not occur :confused:

Has anyone experienced this problem and/or any idea how I can prevent this from happening?

For good measure:
Progress version 9.1C25 on Win2K Pro SP 2
Noy using *any* smart objects whatsoever...
 

jongpau

Member
Trying again, because I still haven't got my sanity back...

Does anybody have a clue, hint, or idea about what may cause or solve this?
 

nborshukov

New Member
Try this:
1. While you run program persistent set handle of the persistent procedure this way:
def var p-h as widget-handle.
run my-program persistent set p-h (params...).
2. run internal procedure in "my-program" which applies "entry" event to any widget in the window(apply "entry":U to fi-any) this way:
run int-proc-name in p-h.

Success!
 
Top