How do I set focus on a specific view

  • I have a window with a tab view, in one of the tabs I have a tableview
    and an image view. The goal is to let the user click an item in the
    table and have it's related image appear in the image view so that it
    can be printed. However when you click in a tableview the focus is then
    set to that view. How can I make sure the focus is returned to the
    image view after the click is performed?

    Thank you
    April.
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.
  • Have you tried     [window makeFirstResponder: myNSImageView];

    On Jul 16, 2004, at 10:01 PM, April Gendill wrote:

    > I have a window with a tab view, in one of the tabs I have a tableview
    > and an image view. The goal is to let the user click an item in the
    > table and have it's related image appear in the image view so that it
    > can be printed. However when you click in a tableview the focus is
    > then set to that view. How can I make sure the focus is returned to
    > the image view after the click is performed?
    _______________________________________________
    cocoa-dev mailing list | <cocoa-dev...>
    Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
    Do not post admin requests to the list. They will be ignored.