Horizontal, Vertical inconsistency

Post Reply
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Horizontal, Vertical inconsistency

Post by DGDanforth »

Folks,
I am getting inconsistent results on BB1.7 Build 560 for using Window=>Horizontal and Window=>Vertical.
If one has 3 or fewer windows open then it works as advertised. But if there are 4 or more windows
then a tiled format is selected for both Horizontal and Vertical.

Is this a feature or a bug?

-Doug
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Horizontal, Vertical inconsistency

Post by DGDanforth »

Looking deeper I see this is implemented in HostMenus with a direct call to a WinApi function

Code: Select all

	PROCEDURE TileHorizontal*;
		VAR res: INTEGER;
	BEGIN
		res := WinApi.SendMessageW(HostWindows.client, WinApi.WM_MDITILE, 3, 0)
	END TileHorizontal;
	
	PROCEDURE TileVertical*;
		VAR res: INTEGER;
	BEGIN
		res := WinApi.SendMessageW(HostWindows.client, WinApi.WM_MDITILE, 2, 0)
	END TileVertical;
	
The Microsoft documentation says
The tiling option. This parameter can be one of the following values, optionally combined with MDITILE_SKIPDISABLED to prevent disabled MDI child windows from being tiled.

MDITILE_SKIPDISABLED = 2;

Value Meaning
MDITILE_HORIZONTAL 0x0001 Tiles windows horizontally.
MDITILE_VERTICAL 0x0000 Tiles windows vertically.
So it appears that the values passed "1" (horizontal) and "0" (vertical) have indeed been combined with "2" to give nontiled windows but that is NOT what I am seeing.

Comments?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Horizontal, Vertical inconsistency

Post by Josef Templ »

This is the same behavior as in BB 1.6.

As you observed, it is part of the Windows MDI (multiple document interface).
Having a large number of windows tiled vertically or horizontally leads to
strange window layouts and therefore there is this 'optimization'.

- Josef
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: Horizontal, Vertical inconsistency

Post by DGDanforth »

OK,
We can remove this "bug" from discussions.
I brought it up because, when I was attempting to show a user of Oberon on the net how easy it was to arrange windows with BB, i was caught off guard when "vertical" suddenly became "tiled" when I added a window.
-Doug
Post Reply