Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nishad

macrumors newbie
Original poster
Aug 2, 2007
11
0
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.
 
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.
 
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.
 
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.

Thanks for responses.
Sorry for late reply.


I am talking about NSRunAlertPanel().
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.