Dragging a dock panel from one host window to another? - dockpanel

I'm wondering if anyone knows how to configure DockPanelSuite to allow dragging of docked windows from one dock container window to another? The demo application shows the menu option Window --> New Window, which creates a new dock container window, but dockable windows cannot be dragged between the two (for example to support multiple monitors with a dock container window on each screen).

Related

How to implement the Windows 10 OneNote Menu in Universal Windows Platform app

I would like to implement the OneNote app menu in my own UWP app. In the closed state, the menu only shows the 'hamburger' button, but when clicked a menu pane slides in from the left.
I have tried to use the SplitView, but it doesn't allow me to set the width to 0 when collapsed, always showing a narrow line on the left side. I also considered using the 8.1 Flyout control, but that doesn't see to animate the correct way.
So, what's the correct way to implement the OneNote menu behavior?
You need the SplitView, but don't mess with the width of its pane.
Instead, set the DisplayMode to Inline (or Overlay) and toggle the IsPaneOpen property.

Accessibility for NSWindow displayed from agent on Mac OS X

NSWindow which is run as modal(runModalForWindow)from a launch agent which has NSUIElement set to 1( no dock icon or menu bar) is not accessible, Accessibility inspector is not displaying info for this window or button from that window.
We need this window to be accessible to automate it through AXElements,
Can we set some properties of Window or button to make it accessible( as per documentation they should be accessible). Are there any properties that we need to set, since this is launched from an agent without menu bar or dock item.
Thanks,
swetha
The alert was shown from awakeFromNib which was causing issue, after moving the alert display code to applicationDidFinishLaunching, the alert is properly accessible through AXElements.

Activate all windows from background when clicking on main window

I have an Objective-C application with a main window and a small progress window with a stack view to show the current progress.
If the application is put in the background by activating any other application and then clicking on the Dock icon, both the Main and secondary windows is brought to the front and shown.
But, if I just click one of the windows when in the background, only that window is activated and brought to the front, the other stays in the back.
I want to implement so that when I click on the main window it does the same thing as clicking on the Dock icon, it should show both windows on top with the Main window activated.
But if I click on the progress window, I don't want the main window to be brought to the front.
I haven't been able to find a way to do this, how should I go about achieving this?
You can detect the window being clicked with the window delegate's -windowDidBecomeKey: or -becomeKeyWindow, or the app delegate's -didBecomeActive:.
Then depending on your exact needs, you can use [NSApp activateIgnoringOtherApps:] or [[NSRunningApplication currentApplication] activateWithOptions:] (and possibly NSApplicationActivateAllWindows).

how to create a another dock

I want to create a dock which will contain some application's icon and at runtime user can add application to that dock by dragging them to dock. when user click on any app icon present in that dock, that app should lunch
hare I don't want to replace the system dock or i am not trying to create a dock inside a application . this is just a another dock in system .
so can any one tell me how to setup this dock app.
Just create a NSWindow, and set the correct level with -[NSWindow setLevel:NSDockWindowLevel];
You can also set a window not to have top bar with buttons and to have transparent contentView.
Then you should handle drag and drop of applications.

Re-create Cocoa application menubar

I'm making a statusbar application and load a new xib containing the main window for the application when clicking on a statusbar menu item. However, in the process I deleted the application menu bar. I don't see a way to hook up the NSMenu object I created in the interface builder.
The window loads just fine, and the status bar icon is still present, but when I make the main window the key window, the application menu bar doesn't change, it just shows the previous app that was active.
I have followed the instructions/suggestions here and here, but neither of them work. Is there some other step I've missed?
Thanks!
The behavior you're describing is normal for background applications. If you don't have an icon in the Dock, you don't get your own menubar, even if you have a window in the foreground.