If you want to center the content, place it inside a div with the css
property "margin: auto".
On 27/12/06, Rengachari, Booshan <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Yes, I specify the size of the window. But I don't know the size of the
> content coming in.
>
> Only I set the content, it horiz-alignment is left and vert-alignment is
> top. Here is the Java Script I use. I simply call showEditWindow with the
> req. parameters.
>
> But the content doesn't get centered.
>
>
>
> Thanks
>
> Booshan
>
>
>
> var editWin;
>
> function createEditWindow( title, width, height) {
>
> if( !width) {
>
> width = 300;
>
> }
>
> if( !height) {
>
> height = 150;
>
> }
>
> if( !editWin) {
>
> editWin = new Window( 'editwin', { opacity:1, resizable: true,
> minimizable: false, maximizable: false, closable: true});
>
> }
>
> editWin.setTitle( title);
>
> editWin.setSize( width, height);
>
> }
>
>
>
> function showEditWindow( title, content, width, height) {
>
> createEditWindow( title, width, height);
>
> editWin.getContent().innerHTML = content;
>
> editWin.showCenter();
>
> editWin.toFront();
>
> }
>
>
>
> function closeEditWindow() {
>
> if( editWin) {
>
> editWin.hide();
>
> editWin.destroy();
>
> editWin = null;
>
> }
>
> }
>
>
>
> ________________________________
>
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Felix Shnir
> Sent: Wednesday, December 27, 2006 3:31 PM
>
> To: [email protected]
> Subject: Re: [Javawin] Centering the contents of the window
>
>
>
>
> Well, if you don't specify the size of the PWC, content should then drive
> the size of the window... Is there a sample somewhere?
>
> Felix.
>
>
>
>
> On 12/27/06, Rengachari, Booshan <[EMAIL PROTECTED]> wrote:
>
>
>
> Felix, thanks for your input. Yes, I am using setContent.
>
>
>
> I know we can set the margin and padding to keep the contents away from the
> borders. But I do not know to keep it centered inside a window.
>
> I mean to calculate the size of the window and the size of the contents that
> gets displayed and then calculate the margin. Is there an easy for it?
>
>
>
> Thanks
>
>
> Booshan Rengachari
>
> ________________________________
>
>
> From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On
> Behalf Of Felix Shnir
> Sent: Wednesday, December 27, 2006 3:01 PM
> To: [email protected]
> Subject: Re: [Javawin] Centering the contents of the window
>
>
>
>
> it would depend on how you generate your contents. If its a URL, the the
> page you are opening must be centered. if its a content set via setContent,
> then make sure you have css that centers your stuff.
>
> Felix.
>
>
> On 12/27/06, Rengachari, Booshan < [EMAIL PROTECTED]> wrote:
>
>
>
>
>
> Gurus,
>
>
>
> If I need to make the contents of the window to be centered, what change do
> I need to make?
>
>
>
> Thanks in advance
>
>
> Booshan Rengachari
>
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>
>
>
>
> --
> Felix
> -------------------------
> God put me on earth to accomplish a certain number of things. Right now,
> I'm so far behind, I will never die...
>
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>
>
>
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com