30 #import "EventData.h" |
30 #import "EventData.h" |
31 #import "Container.h" |
31 #import "Container.h" |
32 #import <objc/runtime.h> |
32 #import <objc/runtime.h> |
33 |
33 |
34 UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs args) { |
34 UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs args) { |
|
35 NSTextView *textview = [[NSTextView alloc] init]; |
|
36 textview.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; |
|
37 |
35 NSScrollView *scrollview = [[NSScrollView alloc] init]; |
38 NSScrollView *scrollview = [[NSScrollView alloc] init]; |
36 NSTextView *textview = [[NSTextView alloc] init]; |
39 scrollview.translatesAutoresizingMaskIntoConstraints = NO; |
|
40 scrollview.hasVerticalScroller = YES; |
37 scrollview.documentView = textview; |
41 scrollview.documentView = textview; |
38 |
42 |
39 UiLayout layout = UI_INIT_LAYOUT(args); |
43 UiLayout layout = UI_INIT_LAYOUT(args); |
40 ui_container_add(obj, scrollview, &layout, TRUE); |
44 ui_container_add(obj, scrollview, &layout, TRUE); |
41 |
45 |