Platforms to show: All Mac Windows Linux Cross-Platform

NSTextFieldCellMBS class

Superclass: 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
Var n as NSTextFieldMBS = NSTextFieldMBS(Label1.NSViewMBS)

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

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

The NSTextFieldCellMBS class adds to the text display capabilities of the NSCellMBS 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 NSTextFieldMBS class, which uses NSTextFieldCellMBS objects to draw and edit text. These NSTextFieldMBS cover methods call the corresponding NSTextFieldCellMBS 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.

Superclass NSActionCellMBS

Superclass NSCellMBS

Sub classes:

Blog Entries

Xojo Developer Magazine

Some events using this class:

Some examples using this class:

Some related classes:


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


NSTextContainerMBS   -   NSTextFieldMBS


The biggest plugin in space...