Attached Windows

I have a Document window and a PlainBox window and want to “glue” them together.
I made this before but I can’t remember how to do it.

Any help?

I do have the MBS-Plugin

You could call an single method in the move(), resizing(), resized(), Maximize(), Minimize() events. This method would orientate the other window’s location based on the current window’s location.

Yes, this is an option. But it doesn’t look so nice.
I like it more if both movies are really stick together.

I meant both windows!

Carbon or Cocoa?
We have examples for putting two windows on the same window group for Carbon which puts them on same layer so they move together.

You would do the exact same thing for the second window as the first, just the orientation method would calculate its position as the other window.

But Christian’s option would probably work better

It’s Cocoa.
Is it not possible with cocoa?

[code]Declare Sub addChildWindow Lib “Cocoa” Selector “addChildWindow:ordered:” (NSWindow As Ptr, childWindow As Ptr, orderingMode As Int32)

Const NSWindowAbove = 1
Const NSWindowBelow = -1

Dim win2 As New Window2()
win2.Left = Left + Width + 20
win2.Top = Top

addChildWindow(Ptr(Handle), Ptr(win2.Handle), NSWindowAbove)[/code]

as you see it’s possible. Whetehr you use declare or NSWindowMBS addChildWindow method via plugin doesn’t matter much.

Thanks a lot!
I can work with that. :slight_smile: