0

I am trying to make an application where you drop a file, and the path is written down to a variable. To do this, I have made a textField, and fixed the other stuff. So it works, but instead of just seeing the path in plain text, I want the user to see nothing.

I though this would work by making my Text Field "hidden", but that also means it's not editable. Is there anything I can do?

2
  • Can you elaborate as to how you drop a file on a text field and fixed the other stuff means?
    – bolnad
    Commented Nov 30, 2015 at 1:08
  • @bolnad I mark it, then drop a file on it. It shows me the path, it's built in. With "the other stuff" I just meant making the contents into a variable first putting property textField : missing value under IBOutlets, and then set iconpath to textField's stringValue() as text. Commented Nov 30, 2015 at 1:20

1 Answer 1

0

You may use like this

NSTextField *textField =[[NSTextField alloc]initWithFrame:NSMakeRect(16, 16, 250, 20)];
[textField setBordered:NO];
[textField setDrawsBackground:YES];
[textField setTextColor:[NSColor clearColor]];
[textField setBackgroundColor:[NSColor clearColor]];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.