Platforms to show: All Mac Windows Linux Cross-Platform

NSTextFieldCellMBS class

Super class: NSActionCellMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Controls MBS MacCocoa Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The text field class for using as NSCell.
Example
// ask for the textfield behind the label
dim n as NSTextFieldMBS = NSTextFieldMBS(label1.NSViewMBS)

// query cell
dim c as NSTextFieldCellMBS = n.cell

// and set background style
c.backgroundStyle = NSTextFieldCellMBS.NSBackgroundStyleRaised

The NSTextFieldCell class adds to the text display capabilities of the NSCell class by allowing you to set the color of both the text and its background. You can also specify whether the cell draws its background at all.

All of the methods declared by this class are also declared by the NSTextField class, which uses NSTextFieldCell objects to draw and edit text. These NSTextField cover methods call the corresponding NSTextFieldCell methods.

Placeholder strings, set using PlaceholderString or PlaceholderAttributedString, now appear in the text field cell if the actual string is "". They are drawn in grey on the cell.
Subclass of the NSActionCellMBS class.

Constants

Constant Value Description
NSTextFieldRoundedBezel 1 One of the constants to specify the bezel style of the text field cell. Corners are rounded.
Available in Mac OS X v10.2 and later.
NSTextFieldSquareBezel 0 One of the constants to specify the bezel style of the text field cell. Corners are square.
Available in Mac OS X v10.2 and later.

Super class NSActionCellMBS

Super class NSCellMBS

Sub classes:

Some events using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine


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


NSTextContainerMBS   -   NSTextFieldMBS


The biggest plugin in space...