Questions tagged [nstextfieldcell]

94 questions
0
votes
1 answer

NSTextFieldCell draws white background only when not the first responder

I have two NSTextFields in a storyboard, both remain untouched from the default configuration, except I have changed their classes to a subclass. I've also subclassed the inner NSTextFieldCell. I've customized each as desired - pretty simple…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
0
votes
1 answer

NSTextFieldCell's cellSizeForBounds: doesn't match wrapping behavior?

It seems to be commonly accepted that cellSizeForBounds: allows one to calculate a text field's "natural" size. However, for NSTextField, I've found that it doesn't quite match: @interface MyTextField : NSTextField @end @implementation…
jtbandes
  • 115,675
  • 35
  • 233
  • 266
0
votes
1 answer

Drawing fixed symbol inside NSTextField

I have a NSTextField and I would like a symbol to always appear at the far left, with the content of the text field beginning to the right of it. For example you can imagine a text field with a dollar sign ($) prefixed at the far left. One could…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
0
votes
0 answers

Bind NSTextfieldCell value to first object of an array

I'm using cocoa binding to bind a NSTextFieldCell value to a controller's dictionnary streamDict. If i use the model key path "self.streamDict.urls.firstObject.url" it failed ! It's ok if i use the model key path "self.streamDict.url" but that not…
Elfoiros
  • 468
  • 1
  • 7
  • 18
0
votes
1 answer

using a custom nstextfieldcell in an nstextfield

I have a custom nstextfieldcell. I thought I could drag a textfield to a xib and click on it's cell, then change the cell's class to my custom class.That doesn't work. Also, I thought I could drag the custom cell from the library (i made a plugin)…
joels
  • 7,249
  • 11
  • 53
  • 94
0
votes
0 answers

How to get NSTextFieldCell StringValue from NSTableView in cocoa

I'm developing an NSTableView (cell based) app based in Xcode5 and I want to get each NSTextFieldCell's cell for determining row's height this is my code so far - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row{ if…
Jesus
  • 8,456
  • 4
  • 28
  • 40
0
votes
1 answer

Custom NSTextFieldCell and background drawing

I created a custom NSTextFieldCell and overwrote - (void)drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView to do my own drawing here. However, I have trouble with background drawing. Without calling super the background is not…
Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
0
votes
1 answer

Right mouse click detection in NSTextFieldCell

I am working with a subclass of NSTextFieldCell and am trying to show a context menu when a right mouse click is performed on the NSTextFieldCell subclass. MouseDown and rightMouseDown do not work only for the objects of the NSTextFieldCell…
Shumais Ul Haq
  • 1,427
  • 1
  • 15
  • 26
0
votes
0 answers

NSButton in custom NSTextFieldCell

I just want to add a simple NSButton with setAction in a custom NStextFieldCell... But my processor takes over 100%... My code is as follows in my custom NStextFieldCell Class : - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView…
Le roukin
  • 95
  • 1
  • 10
0
votes
2 answers

Aligning NSTextField and an Image

I am trying to align an NSTextField and an NSImageView.. My current code is below. I have tried a bunch of different approaches including subclassing NSTextFieldCell (found here on SO), messing around with the frame of the text field, and tweaking…
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
0
votes
1 answer

Problems faced while customizing NSTextFieldCell

I am trying to make cells in an outline view just like we have for users in Skype's message window. For this I created a custom class: IconNameCell.h @interface IconNameCell : NSTextFieldCell { //@private NSImage *userImage; …
Devarshi
  • 16,440
  • 13
  • 72
  • 125
0
votes
1 answer

NSTableView: selecting non-editable CELLS and not ROWS

I've tried numerous combinations of suggested options from other posts, but I can't seem to get a cell-bassed NSTableView populated with non-editable NSTextFieldCell to select the CELL and not the row. I've tried: [[col dataCell]…
SMGreenfield
  • 1,680
  • 19
  • 35
0
votes
2 answers

convert NSTextField to Label

I am using following functions for converting textfield to label and vice versa -(void)convertLabelToTextField : (NSTextField *)Inlabel { [Inlabel setBezeled:YES]; [Inlabel setDrawsBackground:YES]; [Inlabel setEditable:YES]; …
Parag Bafna
  • 22,812
  • 8
  • 71
  • 144
0
votes
1 answer

cocoa: custom text in NSCell for NSTableView

I have problems for customizing the text in the NSCell for the NSTableView. Below is the main window: The window has a table view which shows an icon, a title,a progress indicator and a message.As my computer is 10.6, I implement it with cell-based…
scorpiozj
  • 2,687
  • 5
  • 34
  • 60
0
votes
1 answer

Custom NSTextFieldCell for NSOutlineView

I am wondering how to draw a NSTextFieldCell like the one in NetNewsWire. I have already subclassed a NSTextFieldCell for the group cell and specified it in my PXSourceList's dataCellForItem. The source list is cell based. I just don't know how to…
Souljacker
  • 774
  • 1
  • 13
  • 35