View Full Version : NSView
Mars_999
2003.05.10, 09:49 PM
Is it possible when you display text as a line in a NSView to click on it with a mouse to select the whole line? and send that info to a String? I would think so but have never done it or seen anything about it. Thanks
GoodDoug
2003.05.12, 01:34 PM
Is there a reason you can't use an NSTextField? What you prpose is possible, but it will require you to reimplement a lot of code the Cocoa engineers have already done.
Feanor
2003.05.12, 08:08 PM
NSView doesn't have text features itself, but NSTextView does. If you are just drawing text onto a view, that stops being text once it's drawn. NSTextView (or NSTextField) supports selection and spelling and all that nice stuff with no work from you.
Mars_999
2003.05.13, 02:02 AM
I will have to check that out tomorrow, due to I just got home and can barely stay awake! But what I want to do is display files in a drawer panel and allow the user to see them and then if they want to click on a file to access it. Plus I want to have the file be highlighted with color. e.g. blue or whatever? Thanks
Steven
2003.05.13, 08:18 PM
Use an NSTableView. The row data can be NSAttributedStrings, which allow you to use color and such.
Steven
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.