Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This example displays a input window at a position of 675 from the left.

winMargins = {{675, Automatic}, {130, Automatic}};  
InputString["testing WindowMargins!  stop: 0", 
    FieldSize -> Small, WindowMargins -> winMargins];

I want to display the window centered horizontally on the screen. I tried to use the following, but it does not work.

winMargins = {{Scaled[{0.5}], Automatic}, {130, Automatic}};  

How can I get a horizontally centered input window?

share|improve this question

1 Answer 1

In Version 7 on Windows 7 this configuration appears to produce a horizontally centered window:

winMargins = {{Automatic, Automatic}, {130, Automatic}};
share|improve this answer
    
Works in v8, v9 (Mac) too. –  Michael E2 Jul 26 '13 at 12:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.