Add declarations for setPlaceholderString:/setPlaceholderAttributedString and getters to header and implementation to NSTextField.m

This commit is contained in:
Gregory John Casamento 2022-01-12 04:45:56 -05:00
parent ebc6eb99a3
commit 67860bf8c1
2 changed files with 24 additions and 0 deletions

View file

@ -91,6 +91,10 @@
- (void)setDrawsBackground:(BOOL)flag;
- (void)setTextColor:(NSColor *)aColor;
- (NSColor *)textColor;
- (void) setPlaceholderString: (NSString *)string;
- (NSString *) placeholderString;
- (void) setPlaceholderAttributedString: (NSAttributedString *)string;
- (NSAttributedString *) placeholderAttributedString;
//
// Target and Action

View file

@ -120,6 +120,26 @@ static Class textFieldCellClass;
return YES;
}
- (void) setPlaceholderString: (NSString *)string
{
[_cell setPlaceholderString: string];
}
- (NSString *) placeholderString
{
return [_cell placeholderString];
}
- (void) setPlaceholderAttributedString: (NSAttributedString *)string
{
[_cell setPlaceholderAttributedString: string];
}
- (NSAttributedString *) placeholderAttributedString
{
return [_cell placeholderAttributedString];
}
/** <p>Returns whether the NSTextField is editable. By default a NSTextField
is not editable.</p>
<p>See Also: -setEditable: [NSCell-isEditable]</p>