[Newbie] TabView how to

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default [Newbie] TabView how to

    Hi i'm writing a simple editor and i try to use NSTabView. The problem
    is this : how can i programmaticaly open a new tab and insert a
    NSTextView with scroll support ? When my user open a new file i'm able
    to initialize a new tabItem with a NSTextView inside, but it hasn't
    scroll bar :(

    Please help me

    Wezzy

    Wezzy Guest

  2. Similar Questions and Discussions

    1. A newbie with a newbie question
      Good afternoon everyone, My Name is Dusty I am new to this forum and pretty new to Acrobat. I have Acrobat 9 running on an IMAC running 10.5.2 I...
    2. Help for a Newbie
      Hi All, I have 3 files I am using, Index.html, Test.asp, MyNewpage.html. I am try to load MyNewPage.html into Test.asp. Index.html has a link as...
    3. Newbie help?
      Can someone recommend a book or a site or something that will help me figure out how to make a website in Flash? Can you have iframes of sorts in...
    4. Newbie needs help
      I am teaching myself Flash using Flash MX.. I have created a small Flash movie but can't find any direction on how to get rid of the excess page ...
    5. Newbie help with LWP
      When you login the server must pass a token back to the browser so that the browser can identify itself to the server in the next request. This is...
  3. #2

    Default Re: [Newbie] TabView how to

    In <vl_Ua.26651$sj6.586948@tornado.fastwebnet.it> Wezzy wrote:
    > Hi i'm writing a simple editor and i try to use NSTabView. The problem
    > is this : how can i programmaticaly open a new tab and insert a
    > NSTextView with scroll support ? When my user open a new file i'm able
    > to initialize a new tabItem with a NSTextView inside, but it hasn't
    > scroll bar :(
    An NSTextView doesn't have a scroll bar. An NSScrollView has a scroll
    bar. If you want a scrollable text view, make an NSScrollView and put an
    NSTextView inside it. m.

    PS This has nothing to do with TabView.

    --
    matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  4. #3

    Default Re: [Newbie] TabView how to

    In <gaeVa.27631$sj6.608593@tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    >> An NSTextView doesn't have a scroll bar. An NSScrollView has a scroll
    >> bar. If you want a scrollable text view, make an NSScrollView and put
    >> an NSTextView inside it. m. PS This has nothing to do with TabView.
    >>
    >
    > Yes i've understand it but how can i put the NSTextView in
    > NSScrollView ?? i'm not able to do it!
    You make an NSScrollView, you make an NSTextView, and then you call
    setDocumentView. m.


    --
    matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  5. #4

    Default Re: [Newbie] TabView how to

    matt neuburg wrote:

    > You make an NSScrollView, you make an NSTextView, and then you call
    > setDocumentView. m.
    >
    Well i try something like this but it doesn't work!

    NSScrollView *scroller;
    NSTabViewItem * item;

    scroller = [[NSScrollView alloc] init];
    [scroller setDocumentView:[[NSTextView alloc] init]];

    item = [[NSTabViewItem alloc] init];
    [item setView:scroller];

    [myTabView addTabViewItem:item];

    Can you tell me where is my error ?

    Thanks a lot for your time
    Wezzy
    Wezzy Guest

  6. #5

    Default Re: [Newbie] TabView how to

    In <z9jVa.28412$sj6.618635@tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    > scroller = [[NSScrollView alloc] init];
    That's not how you create an NSScrollView. Read the docs. Hint: an
    NSScrollView is an NSView. m.

    --
    matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  7. #6

    Default Re: [Newbie] TabView how to

    matt neuburg wrote:
    > In <z9jVa.28412$sj6.618635@tornado.fastwebnet.it> Wezzy wrote:
    >> matt neuburg wrote:
    >>
    >> scroller = [[NSScrollView alloc] init];
    >
    > That's not how you create an NSScrollView. Read the docs. Hint: an
    > NSScrollView is an NSView. m.
    >
    Ok now i go to read everything about NSView!

    Can you sugguest me a good Cocoa book?

    Thanks a lot
    Wezzy
    Wezzy Guest

  8. #7

    Default Re: [Newbie] TabView how to

    In <yRrVa.28621$sj6.626359@tornado.fastwebnet.it> Wezzy wrote:
    > matt neuburg wrote:
    >
    >> In <z9jVa.28412$sj6.618635@tornado.fastwebnet.it> Wezzy wrote:
    >>> matt neuburg wrote:
    >>>
    >>> scroller = [[NSScrollView alloc] init];
    >>
    >> That's not how you create an NSScrollView. Read the docs. Hint: an
    >> NSScrollView is an NSView. m.
    >>
    >
    > Ok now i go to read everything about NSView!
    >
    > Can you sugguest me a good Cocoa book?
    The docs that come with Cocoa are excellent (and getting better). m.

    --
    matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

  9. #8

    Default Re: [Newbie] TabView how to

    In message <vl_Ua.26651$sj6.586948@tornado.fastwebnet.it>, Wezzy <Fabio@est.it>
    wrote:
    >
    > Hi i'm writing a simple editor and i try to use NSTabView. The problem
    > is this : how can i programmaticaly open a new tab and insert a
    > NSTextView with scroll support ? When my user open a new file i'm able
    > to initialize a new tabItem with a NSTextView inside, but it hasn't
    > scroll bar :(
    >
    > Please help me
    >
    > Wezzy
    >
    That's because an NSTextView is usually put inside an NSScrollView...

    -Laurent.
    --
    ================================================== ===============
    Laurent Daudelin Logiciels Nemesys Software
    mailto:laurent.daudelin@ihatespam.net <http://nemesys.dyndns.org>
    Replace ihatespam with verizon to reply
    +++++++++++ Sent using an Apple Newton MessagePad 2100 ++++++++++

    Laurent Daudelin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139