Hi!
In my dialog, I have a textarea, and I change dimensions of this textarea after the dialog loads. dialog.SetAutoSize() works ok for resizing the dialog, but it also should be nice to change the position of the dialog so this dialog stays in the center of the screen.
Is there any way I can do this? Thank you much in advance!
In my dialog, I have a textarea, and I change dimensions of this textarea after the dialog loads. dialog.SetAutoSize() works ok for resizing the dialog, but it also should be nice to change the position of the dialog so this dialog stays in the center of the screen.
Is there any way I can do this? Thank you much in advance!

Re: Dialog Centering - ?
Re: Dialog Centering - ?
var dialog = window.parent; var editorInstance = editorWindow.FCK; var FCKTools = editorWindow.FCKTools; // recenter dialog setTimeout(function(){ // after a dummy delay, needed for webkit var topWindowSize = FCKTools.GetViewPaneSize(dialog.top.window); dialog.frameElement.style.left = Math.round((topWindowSize.Width - dialog.frameElement.offsetWidth) / 2) + 'px'; dialog.frameElement.style.top = Math.round((topWindowSize.Height - dialog.frameElement.offsetHeight) / 2).toString() + 'px';; }, 0);