Any Rich Text Edit controls?

Discussion in 'Mac Programming' started by resander, May 5, 2008.

  1. resander macrumors newbie

    Joined:
    Apr 12, 2008
    #1
    I am considering porting applications that use Rich Edit
    controls from Windows to Mac OS X.

    Are Rich Edit text controls supported?

    Note 1:
    a rich edit control supports colour and font
    changes in the text.
    The Windows API has functions to change colour and font of
    currently selected text in the control. In theory this
    would allow a program to change text attributes
    dynamically on the fly, but see Note 2...

    Note 2:
    The API for rich edit controls worked fine for 2-3 page
    tiny texts. For larger texts, 50 or more pages, the screen
    was twitching and blinking and it took more than 30 seconds
    to show the first page. Other users have reported the same
    on various forums. My workround was not to use the API
    and putting raw rtf format text into the control starting
    from the top.
    If rich edit controls are supported do they have this
    problem too?

    If rich edit controls are not supported is there something
    equivalant?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    NSTextView

    This is the view that TextEdit uses in both full rich text and plain text mode. It supports multiple fonts, colours, tables, etc (mostly via attributed string methods).

    The entire TextEdit source is included with XCode in the examples: you can see how it all works.
     

Share This Page