set position of dialog box

Discussion in 'Mac Programming' started by Nishad, Nov 26, 2008.

  1. Nishad macrumors newbie

    Joined:
    Aug 2, 2007
    #1
    Hi all,


    how can i set the position of message dialog box with respect to main window.
    please give some information.

    With thanks & Regards,
    Nishad.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Assuming you're using Cocoa, you can use the setFrame:display: method to set the frame, and then the frame method to get the frame of the main window and calculate the position based on that.
     
  3. mkelly11 macrumors newbie

    Joined:
    Dec 1, 2008
    #3
    Are you talking about a dialog box from NSRunAlertPanel() or something like it? Because in that case, I don't think you're able to position it. You could always try writing your own alert box routine that would allow you to position it.
     
  4. Nishad thread starter macrumors newbie

    Joined:
    Aug 2, 2007
    #4
    Thanks for responses.
    Sorry for late reply.


    I am talking about NSRunAlertPanel().
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    I don't think you can with that function. You could try replacing it with NSAlert which has a window method. You might be able to manipulate that.
     

Share This Page