Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add vertical scrollbar to NSTextField?

I am trying to make a command window(user types in text) and need to put in place a scrollbar, to look back at what was typed, on the NSTextField. thx

like image 370
jdl Avatar asked May 02 '12 19:05

jdl


People also ask

How do I set my vertical scrollbar?

For vertical scrollable bar use the x and y axis. Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable.


1 Answers

NSTextField is usually used only for one line text so You need to use NSTextView instead NSTextField to achieve scrolling.

NSTextView Reference.

TextView

like image 59
Justin Boo Avatar answered Sep 22 '22 16:09

Justin Boo