Carl Your the bomb! With the small adjustment of removing the 200x100 (to allow for full screenage) it works perfectly and its consistent in all screen resolutions.
This information would be an ideal ( how to ) forum entry! ; ) Rebol[] screen-size: system/view/screen-face/size view center-face layout [ size screen-size b: button "OK" [unview] do [b/offset: screen-size / 2 - (b/size / 2)] ] ----- Original Message ----- From: "Carl Read" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 04, 2004 4:37 AM Subject: [REBOL] Re: Center object & screen res. > > On 04-Jan-04, Defiant Mail wrote: > > > Tried the below but the button shows up at default (25x25) > > > Rebol[] > > > view center-face layout [ > > size system/view/screen-face/size > > button "OK" [unview]] > > This I think does what you want... > > screen-size: 200x100 ;system/view/screen-face/size > view center-face layout [ > size screen-size > b: button "OK" [unview] > do [b/offset: screen-size / 2 - (b/size / 2)] > ] > > Note you could also get the screen size by looking at > b/parent-face/size, but not until after the layout had been VIEWed, > so it can't be used in the DO block above. A feel function that's > called when the layout's first VIEWed and when it's resized would be > one way to put parent-face to work. > > HTHs. > > -- > Carl Read > > -- > To unsubscribe from this list, just send an email to > [EMAIL PROTECTED] with unsubscribe as the subject. > > > -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.