No-focus bug vs feature

Prior to OpenEdge 10.1, when you click a no-focus, flat button in a window the window does not get focus. It's z-order among other windows is unchanged.

In 10.1A this feature (Progress calls it a bug) is fixed. Clicking a no-focus button now sets the focus to the window containing the button.

I'm looking for a way to get the old behaviour back.

Attached you can find some rough code to demonstrate this. Extract the files to a directory in the propath, connect to a sports db and run custbrowse.p .

If you run the code with a pre-10.1 version, the window z-order remain unchanged when you click the next or prev button in the bottom window. In 10.1A/B/C the bottom window moves to the top, hidding the content of the other windows.

Our customer (and we) want the old behaviour back, but I have not yet found a way to code it. Top-only does not give the same effect.

I'm looking for a way to preserve, or save and restore, the z-order of windows in 10.1x


AttachmentSize
winnofocus.zip794.52 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

scheduled for fix in 10.1C02

OpenEdge Development is working on a -nofixfocus startup parameter. Currently scheduled for OpenEdge 10.1C02


jurjen's picture

re: no-focus bug vs feature

Hi Carl,

I have to agree with Progress that this was a bug. Click on the flat no-focus button should indeed activate the window, and when a window gets activated it should be placed in front of all the other windows (except its own child windows).

To get the buggy behaviour back, you could experiment with window parenting: try SetParent or SetWindowLong(...,-8,...) to specify that custbrowse is the parent window of the other two windows. See http://www.oehive.org/node/397 for some code samples that play with reparenting.
Disclaimer: I don't promise anything, except that an attempt to re-introduce a bug might actually introduce a bug :-)