dock

OS X Dock API? Retrieve OS X active application's icon with badges and other modifications

帅比萌擦擦* 提交于 2020-01-01 18:43:17
问题 Is there an API for retrieving the icons of the currently open apps on Mac OS X? I am trying to retrieve all the icons of the active applications along with any badges on top of the application (i.e. number of new messages in mail, or current download rate in Transmission). Is there some sort of Dock API? The only mention of an OSX API for retrieving information about currently active applications I have been able to find is the Process Manager API, which does not mention the ability to poll

How do I make an OS X application react when a file, picture, etc is dropped on its dock icon?

人走茶凉 提交于 2019-12-28 05:34:25
问题 Some applications, like Photoshop, allow users to drag a picture from a web browser, or drag a file from the filesystem, onto the application's icon in the dock. Doing this opens the file in that application. How is this done? I'd like to use Cocoa and Objective-C, but I'm interested in any solutions in any languages. 回答1: NSApplication allows you to set a delegate for your application. If the user drags a file onto your dock icon, NSApplication will call the method - (BOOL)application:

How do I make an OS X application react when a file, picture, etc is dropped on its dock icon?

房东的猫 提交于 2019-12-28 05:34:09
问题 Some applications, like Photoshop, allow users to drag a picture from a web browser, or drag a file from the filesystem, onto the application's icon in the dock. Doing this opens the file in that application. How is this done? I'd like to use Cocoa and Objective-C, but I'm interested in any solutions in any languages. 回答1: NSApplication allows you to set a delegate for your application. If the user drags a file onto your dock icon, NSApplication will call the method - (BOOL)application:

How would I go about changing the hover text over icon in doc? (Java)

萝らか妹 提交于 2019-12-24 07:23:56
问题 Okay. I have a gui with a title called "My Java Application". When I minimize it to my doc and hover over the icon, it just says "java", not "My Java Application". How would I fix that? P.S. I am using a Macintosh computer. 回答1: There's apparently a command line option for this on the Mac: -Xdock:name="YourNameHere" There's also some more information here: Programatically setting the dock:name Java Mac OS X JVM property Native Swing Menu Bar Support For MacOS X In Java 回答2: Close the app if

how to change dock icon using setContentView to display one big character in mac os x

删除回忆录丶 提交于 2019-12-23 04:54:16
问题 I want to change the dock icon of an app into one big character like an "A" or "B" for example using swift or objective C 回答1: import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! @IBOutlet weak var dockView: NSView! @IBOutlet weak var dockText: NSTextField! let appDockTile = NSApplication.sharedApplication().dockTile func prepareDock(){ appDockTile.contentView = dockView appDockTile.display() } func changeText(){ dockText

How to dock a windows form in C#?

谁都会走 提交于 2019-12-22 05:51:32
问题 I just would like to know if it is possible to dock a windows form on top of the user screen? I have been trying to do this by manually setting the position of my form to the coordinates I want. But using this method, however, allows the user to change the position of the form just by dragging it. I want to make the form docked to the upper portion of the screen since this window form will server as a menu for the project I am making. Thanks a lot. :) 回答1: I would consider using the Control

How to dock a windows form in C#?

旧街凉风 提交于 2019-12-22 05:51:07
问题 I just would like to know if it is possible to dock a windows form on top of the user screen? I have been trying to do this by manually setting the position of my form to the coordinates I want. But using this method, however, allows the user to change the position of the form just by dragging it. I want to make the form docked to the upper portion of the screen since this window form will server as a menu for the project I am making. Thanks a lot. :) 回答1: I would consider using the Control

ListBox AutoSizes by item height

喜欢而已 提交于 2019-12-19 19:12:26
问题 I use TableLayoutPanel for all my elements in a form. I use Dock Fill to autosize a TextBox and a ListBox. TextBox fits perfectly in a cell of the TableLayoutPanel but not a ListBox. It autosizes by item height. How to delete this gap between the bottom of the ListBox and the bottom of the form? I know I can set the height of the ListBox by a certain value (e.g. item height in the ListBox is 16, 16 * 10 elements= 160, 160 will fit correctly), but is there any other solutions? I'm using C#.

How to hide the Java SWT program icon in the Dock when the application is in the tray

家住魔仙堡 提交于 2019-12-17 20:18:49
问题 I know there are a lot of questions similar to mine, but I actually couldn't solve my problem even after reading all of them. I have a Java application that as soon as it starts it goes on tray. The problem is on Mac, because only there the icon is in the tray bar AND in the Dock. I want to get rid of the Dock icon. I did already a number of trials: try to wrap my jar in a ".app" folder and writing an Info.plist file. I inserted the LSUIElement and set it to "1" or to "true". This hides the

Preventing window overlap in GTK

自作多情 提交于 2019-12-17 19:04:18
问题 I've got a Python/Linux application that displays bits of info I need in a GTK window. For the purposes of this discussion, it should behave exactly like a dock - exists on all virtual desktops, and maximized windows do not overlap it. The first point is pretty easy, but I have spent days bashing my head against my monitor trying to get the second point - preventing overlap. My app should not be covered if another window is maximized. Setting "always on top" is not enough, as the other