Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSDockTileMBS class.

NSDockTileMBS.badgeLabel as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: The tile's current badge label.
Example:
dim d as NSDockTileMBS = NSApplicationMBS.sharedApplication.dockTile

if d<>nil then
// this works in Carbon and Cocoa applications :-)

d.badgeLabel = "Hello"
d.showsApplicationBadge = true
end if
Notes:
The localized string to be displayed in the tile's badging area. This string may be empty.
(Read and Write computed property)
NSDockTileMBS.Constructor   Private
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: The private constructor.
NSDockTileMBS.contentView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: The view used to draw the dock tile contents.
Notes:
The view you specify should be height and width resizable.

Cocoa does not automatically redraw the contents of your dock tile. Instead, your application must explicitly send display messages to the dock tile object whenever the contents of your view change and need to be redrawn. Your dock tile view is responsible for drawing the entire contents of the dock tile. Your view does not need to draw the application or custom string badges.
(Read and Write computed property)
NSDockTileMBS.display
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Redraws the dock tile's content.
Notes:
If a custom content view is provided, Cocoa calls the drawRect method of that view (and its subviews) to draw the tile's content.

You can call this method to force the redrawing of the dock tile contents. You might do this if the contents of the underlying application or window change in a way that would require a refreshing of the tile. Some types of system activity, such as resizing the dock, may trigger automatic redraws of the tile. In most cases, however, your application is responsible for triggering redraws.

Cocoa does not automatically redraw the contents of your dock tile. Instead, your application must explicitly send display messages to the dock tile object whenever the contents of your view change and need to be redrawn.
NSDockTileMBS.owner as Variant
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Returns the object represented by the dock tile.
Example:
dim d as NSDockTileMBS = NSApplicationMBS.sharedApplication.dockTile

if d<>nil then
dim t as Introspection.TypeInfo = Introspection.GetType(d.owner)
MsgBox t.FullName // shows NSApplicationMBS
end if
Notes: The object represented by the dock tile. This is either the NSApplicationMBS object or one of your application's NSWindowMBS objects.
NSDockTileMBS.showsApplicationBadge as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Whether the tile should be badged with the application's icon.
Example:
dim d as NSDockTileMBS = NSApplicationMBS.sharedApplication.dockTile

if d<>nil then
// this works in Carbon and Cocoa applications :-)

d.badgeLabel = "Hello"
d.showsApplicationBadge = true
end if
Notes:
Miniaturized windows include the application badge by default to convey the associated application to the user. In Mac OS X v10.5 and later, application tiles do not support the application badge. A miniaturized window with a custom view does not draw the application badge.

The application icon is positioned automatically in the tile by the NSDockTile object.
(Read and Write computed property)
NSDockTileMBS.size as NSSizeMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacCocoa Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Returns the size of the tile.
Example:
dim d as NSDockTileMBS = NSApplicationMBS.sharedApplication.dockTile

if d<>nil then
MsgBox str(D.size.Width)+" x "+str(d.size.Height)
// 128 x 128 in Mac OS X 10.5 and 10.6
end if
Notes: The size returned by this method corresponds to the size of the backing store in the dock, which may be bigger than the actual tile displayed on the screen.

The items on this page are in the following plugins: MBS MacCocoa Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...


Start Chat