nstextview Questions
5
Solved
I have a NSTextView with a sizeable quantity of text. Whenever I scroll however, the view isn't updated properly. There are some artifacts that remain at the top or the bottom of the view. It appea...
Gasman asked 11/5, 2009 at 19:27
2
Solved
I am using SwiftUI to build an app for iOS, iPadOS and macOS and I need a TextEditor with a transparent background.
This question has been asked before and I found a good answer for iOS/iPadOS (Cha...
Zosema asked 23/1, 2021 at 22:36
2
I am using a custom mouseMove event in NSTextView to set the cursor to a pointer when it's outside the content insets. When it's inside the editable area, I'm calling [super mouseMove]:
- (void)mou...
Casia asked 3/11, 2020 at 11:58
4
I am trying to set an attributed string within NSTextView. I want to increase its height based on its content, initially it is set to some default value.
So I tried this method:
I set content in ...
Pullman asked 16/4, 2010 at 16:26
1
I am using an NSTextView inside NSViewRepresentable in a SwiftUI app.
The NSViewRepresentable correctly resizes to the height of the NSTextView, so the text flows to multiple lines, but on the firs...
Roseline asked 12/10, 2022 at 17:16
6
Solved
Is there any way to set the placeholder string for NSTextView like that in NSTextField? I have checked the property but couldn't find it. I have searched some questions but there isn't a proper exp...
Virtuosity asked 3/4, 2015 at 8:13
3
I'm using an NSTextView to allow multi-line input. However, due to the nature of my app, users will be more comfortable moving to the next input element when they press TAB.
How can I make TAB exi...
Murky asked 20/3, 2010 at 17:47
2
Solved
I'm trying to implement a syntax-coloring text editor that also does things like insert whitespace at the start of a new line for you, or replace text with text attachments.
After perusing the doc...
Concierge asked 16/7, 2017 at 9:15
1
I'm trying to figure out how to use NSTextList but have found little useful information online aside from this SO question and the comment in this blog.
Using this I have been able to create a crud...
Evelinaeveline asked 19/3, 2021 at 19:39
2
Solved
How do I properly implement NSView constraints on the NSTextView below so it interacts with SwiftUI .frame()?
Goal
An NSTextView that, upon new lines, expands its frame vertically to force a SwiftU...
Petal asked 28/7, 2020 at 4:36
3
Solved
Following the apple documentation I am trying to set up a simple NSTextView via its two constructor methods.
I am placing the below code inside the viewDidAppear method of the view controller of ...
Toilet asked 13/3, 2015 at 14:55
3
Solved
If a NSTextView contains the following:
SELECT someTable.someColumn FROM someTable
And a user double-clicks someTable.someColumn, the entire thing gets selected (both sides of the period). In th...
Tubulate asked 25/2, 2014 at 14:32
2
Solved
I am working on a rich text editor in a Mac app that uses Markdown syntax. I use NSTextStorage to watch for matches in Markdown syntax, then apply styles to the NSAttributedString in real time like...
Iphigeniah asked 12/8, 2019 at 20:39
3
Solved
Because of the semantics of certain NSTextView attachments in my application, I want to know when they are inserted or deleted from my text storage.
My subclass of NSTextView implements the should...
Berti asked 23/10, 2009 at 15:59
4
Solved
I'm trying to specify the number of lines for NSTextView. My designer is requesting 2 lines of text max. I've tried NSMutableParagraph style to add the ellipses truncation that I want, but with NSM...
Landri asked 19/9, 2015 at 8:5
5
Solved
NSTextView does word-wrap by default. How can I disable this?
I'm making a JSON code viewer, so I have to disable this.
Acolyte asked 4/7, 2010 at 8:15
3
I'm trying to nicely display paragraphs of highlighted in a NSTextView. Right now, I'm doing this by creating a NSAttributedString with a background color. Here's some simplified code:
NSDictionar...
Epiphany asked 22/9, 2013 at 0:16
4
Solved
When I build my macOS app in Dark Mode, some of my text views (NSTextView) render black text on an almost-black background. In Interface Builder, in the Attributes Inspector, the "Text Color&q...
Spinks asked 16/10, 2018 at 6:36
3
Solved
I want to change the color of ALL the text in a NSTextView.
Currently, I have code doing this:
NSMutableDictionary* fontAttributes = [[NSMutableDictionary alloc] init];
[fontAttributes setObject: ...
Agathy asked 16/11, 2011 at 9:53
4
Solved
I'm using an NSTask to run rsync, and I'd like the status to show up in the text view of a scroll view inside a window. Right now I have this:
let pipe = NSPipe()
task2.standardOutput = pipe
task2...
Halden asked 9/4, 2015 at 20:55
1
I am trying to create a custom NSTextBlock, much like the one Apple did at WWDC 18 (23 mins in).
Full demo project here.
Okay, so it works great when I'm editing and marking a paragraph with my ...
Lecherous asked 30/10, 2019 at 8:10
2
Solved
I'm implementing a "search in chat" feature and I want the searched word to be highlighted in messages. The problem, as described in title, is that if the word is the first of a line (long messages...
Logotype asked 6/9, 2019 at 10:44
1
Solved
I want to achieve the same thing as [[NSFontManager sharedFontManager] addFontTrait:(nullable id)sender] only using my code
The doc states
This action method causes the receiver to send its actio...
Northman asked 9/8, 2016 at 18:25
3
Solved
The default value for [NSTextView selectedTextAttributes] is unusable in my app, because i allow the user to select colors (syntax highlighting) that are almost exactly the same as the background c...
Belenbelesprit asked 18/4, 2013 at 1:52
4
Solved
Context:
I have a normal Document-based Cocoa Mac OS X application which uses an NSTextView for rich text input. The user may edit the font family, point size and colors of the text in the NSTextV...
Carolyn asked 1/1, 2013 at 18:43
1 Next >
© 2022 - 2024 — McMap. All rights reserved.