Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Locate palette at top edge of screen?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91355] Re: Locate palette at top edge of screen?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 17 Aug 2008 06:40:58 -0400 (EDT)
  • References: <g8682n$hpr$1@smc.vnet.net>

Hi,

try

pal = CreatePalette[PasteButton[\[Alpha]]];

Manipulate[
  SetOptions[pal,
   WindowMargins -> {{p[[1]], Automatic}, {p[[2]], Automatic}}]; p,
  {{p, {0, 0}}, {0, 0}, {1280, 1024}, ControlType -> Slider2D}
  ]

and use the position you like.

Regards
   Jens

L. Dwynn Lafleur wrote:
> (Windows XP SP3, Mathematica 6.0.3)
> 
> I am trying to create a command that moves a palette so that its top
> edge is at or near the top edge of the screen, i.e., superimposed on the
> space occupied by the main title bar (the bar containing "Wolfram
> Mathematica 6.0 - <notebook name>" and the menu titles.)
> 
> If I simply use the example in the "CreatePalette" entry in the Help
> documentation
> 
>     pal = CreatePalette[PasteButton[\[Alpha]]];
> 
> a small palette is created.  (In my case, most of it extends off the
> right edge of my screen).
> 
> I then use the mouse to drag this palette onto the center area of the
> main title bar, placing its top edge at the top edge of the screen and
> thus practically coincident with the top edge of the main  title bar.
> To determine the coordinates (window margins) in this desired location,
> I execute the command
> 
> Options[pal, WindowMargins]
> 
> and the result in this case is
> 
> {WindowMargins -> {{599, Automatic}, {Automatic, -50}}}
> 
> Using the mouse, I drag the palette away from this location, then
> execute the following command, expecting it to move the palette back to
> the desired position.
> 
> SetOptions[pal, WindowMargins -> {{599, Automatic}, {Automatic, -50}}
> 
> Instead, the palette moves to the correct horizontal postion, but its
> top edge is at the BOTTOM edge of the main title bar, not at the top
> edge of the screen.  Executing the command
> 
> Options[pal, WindowMargins]
> 
> yields
> 
> {WindowMargins -> {{599, Automatic}, {Automatic, -50}}}
> 
> which is inconsistent with the screen position.  Indeed, if I again move
> the mouse to another location, then execute
> 
> SetOptions[pal, WindowMargins -> {{599, Automatic}, {Automatic, 0}}
> 
> the palette moves back to its previous position right below the main
> title bar.  Thus an upper margin of 0 corresponds with the bottom edge
> of the main title bar, therefore implying a value of -50 should be above
> that edge.  However, it seems a command of the form
> "SetOptions[...,WindowMargins->{{...},{Automatic,x}}]" converts negative
> values of x to 0.
> 
> Is there a command that can move a palette so its top edge is at the top
> edge of the screen?
> 
> 
> Dwynn
> 


  • Prev by Date: Re: troubling simple integral
  • Next by Date: Equations system with zero
  • Previous by thread: Locate palette at top edge of screen?
  • Next by thread: Re: Locate palette at top edge of screen?