Professional Web Applications Themes

Help with menus - Mac Programming

I have program which works from the status and I need to populate the menu with text. I'm having trouble keeping the text within reasonable boundaries. Somtimes, depending on the text, it is too wide for a menu or too long. I would like to reduce the size of the text, but it seems Cocoa has no way of doing this. The text is not so long that I think I need to reconsider what I'm doing, if I could just get the point size down a couple of pixels, I'd be OK. Does anyone have any ideas?...

  1. #1

    Default Help with menus

    I have program which works from the status and I need to populate the
    menu with text. I'm having trouble keeping the text within reasonable
    boundaries. Somtimes, depending on the text, it is too wide for a menu
    or too long. I would like to reduce the size of the text, but it seems
    Cocoa has no way of doing this. The text is not so long that I think I
    need to reconsider what I'm doing, if I could just get the point size
    down a couple of pixels, I'd be OK.
    Does anyone have any ideas?
    Lorenzo Guest

  2. #2

    Default Re: Help with menus

    In article <thethurmans.com>,
    Lorenzo Thurman <com> wrote:
     

    There is an NSParagraphStyle that lets you truncate text at the end,
    and (starting with 10.3) even in the middle, by inserting an ellipsis.
    If that doesn't work in your case, you can use the NSStringDrawing
    category on NSString/NSAttributedString to measure a string's width, and
    manually truncate it or turn down the size until the size is more to
    your liking.

    Is that what you were asking for?

    Cheers,
    -- Uli
    http://www.zathras.de
    Uli Guest

  3. #3

    Default Re: Help with menus

    In article <t-online.com>,
    Uli Kusterer <de> wrote:
     
    >
    > There is an NSParagraphStyle that lets you truncate text at the end,
    > and (starting with 10.3) even in the middle, by inserting an ellipsis.[/ref]

    You wouldn't want to truncate a menu item label and trail off with
    ellipsis points. That presentation has a defined semantic that could be
    jarring to users if it's not followed.
     

    G

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  4. #4

    Default Re: Help with menus

    In article <t-online.com>,
    Uli Kusterer <de> wrote:
     
    >
    > There is an NSParagraphStyle that lets you truncate text at the end,
    > and (starting with 10.3) even in the middle, by inserting an ellipsis.
    > If that doesn't work in your case, you can use the NSStringDrawing
    > category on NSString/NSAttributedString to measure a string's width, and
    > manually truncate it or turn down the size until the size is more to
    > your liking.
    >
    > Is that what you were asking for?
    >
    > Cheers,
    > -- Uli
    > http://www.zathras.de[/ref]

    I'd actually like to keep the entire text. Looking through the menu
    doentation, I see hat one can place an image in a menu. Would it be
    possible to turn that text into an image, scale it to a usable size and
    then insert the image into the menu? The menu items themselves have no
    action associated with them. They just display text.
    Lorenzo Guest

Similar Threads

  1. pop-up menus
    By web_rookie webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 5
    Last Post: May 6th, 09:23 PM
  2. menus
    By js in forum PHP Development
    Replies: 2
    Last Post: March 23rd, 03:00 PM
  3. FW pop up menus
    By RSteel webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 1
    Last Post: September 4th, 02:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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