Docking windows????

  1. 7 months ago

    Richard A

    20 Mar 2017 Pre-Release Testers, Xojo Pro

    Ok I just noticed something a little while ago... When running my app and I have a window open and then open another window it docks with the first one, even if the first one is too small.

    When did this start and is there a way to turn off this behavior.

    Thanks

    Rich

  2. Tim P

    20 Mar 2017 Pre-Release Testers, Xojo Pro ⭐️

    This sounds like it's in your code or an app you have on your computer…

  3. Gavin S

    20 Mar 2017 Pre-Release Testers UK
    Edited 7 months ago by Gavin S

    It sounded like Sierra's auto-tabs feature to me. Richard, if that's what it is, then see this thread - https://forum.xojo.com/34310-sierra-auto-tabbing - for MBS properties and a Declare to switch it off.

  4. Sam R

    20 Mar 2017 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @RichardAlbrecht Ok I just noticed something a little while ago... When running my app and I have a window open and then open another window it docks with the first one, even if the first one is too small.

    When did this start and is there a way to turn off this behavior.

    Thanks

    Rich

    Windows or Mac? I seem to recall that this is a *feature* of macOS Sierra.

  5. Jeff T

    20 Mar 2017 Midlands of England, Europe

    Yup
    Its sierra.
    And its a problem when (as the OP says), 2 documents of vastly different sizes are opened.

    Its a bigger problem for Xojo apps because there is no event that tells you that your window has resized.
    Buttons and status bars at the bottom suddenly become obscured with no automatic way to move them.

    I've turned this off using the call above. (Much as I had to stop MacOS from making ALL my windows maximised if one of them went full screen. A small dialog with 4 controls on it looks stupid when it fills the screen)

  6. Sam R

    21 Mar 2017 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    Do you mean that both windows are combined into one? Or do you mean that they snap together at the edges?

    @Jeff T I've turned this off using the call above. (Much as I had to stop MacOS from making ALL my windows maximised if one of them went full screen. A small dialog with 4 controls on it looks stupid when it fills the screen)

    Yeah okay, to stop that you need the following code.

    Public Sub zoomButtonAction(extends w as window, assigns value as integer)
      #if targetMacOS then
        Declare Function collectionBehavior Lib "AppKit" Selector "collectionBehavior" ( obj As Integer ) As UInteger
        Declare Sub setCollectionBehavior Lib "AppKit" Selector "setCollectionBehavior:" ( obj As Integer, value As UInteger )
        
        Dim behavior As UInteger = collectionBehavior( w.Handle )
        setCollectionBehavior( w.handle, behavior Or value )
      #endif
    End Sub
    Const kZoomButtonActionZoom = 512

    Then call it in the open event of the window.

    me.zoomButtonAction = kZoomButtonActionZoom

    In some apps I've been adding an option so that the user can specify if they want Full Screen or the classic way. In some others I've just defaulted to the classic way because it makes zero sense for the window to go Full Screen.

or Sign Up to reply!