1

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?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
user25076
  • 79
  • 3

1 Answers1

5

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

winMargins = {{Automatic, Automatic}, {130, Automatic}};
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371