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.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
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.
 

mkelly11

macrumors newbie
Dec 1, 2008
7
0
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.
 

Nishad

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

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
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.