10
$\begingroup$

When the Mathematica application loses focus, palette windows disappear (normal notebooks and dialogs (CreateDialog) stay). This is usually convenient because the small palette windows would clutter the screen.

I would like to use a palette as a drag-and-drop target. For this I need to keep it visible even when another application is focused. Which notebook property needs to be changed to prevent one particular palette from disappearing when Mathematica loses focus?

(Why I want to keep this drop target as a palette: it's easy to open from the Palettes menu and it has a small frame.)

Note: Per the comments below, this does not seem to happen on all systems.

Update: It seems that this is an OS-wide behaviour for this window type, at least on OS X. The answers suggest changing the window type (WindowFrame option).


Here are two screenshots to demonstrate. The only difference is switching the focus to the browser.

Mathematica graphics

Mathematica graphics

$\endgroup$
6
  • 1
    $\begingroup$ On Windows, palettes appear to stay even when the FE loses focus, so perhaps this is a feature peculiar to Macs? $\endgroup$ Commented Nov 8, 2012 at 19:41
  • $\begingroup$ i.sstatic.net/pb0YR.png $\endgroup$ Commented Nov 8, 2012 at 19:41
  • $\begingroup$ @OleksandrR. So that's why it felt a little unusual ... I'll update the question. $\endgroup$
    – Szabolcs
    Commented Nov 8, 2012 at 19:41
  • 1
    $\begingroup$ I am on Windows and palettes go away just like you describe. Right now, W8 $\endgroup$
    – Rojo
    Commented Nov 8, 2012 at 19:44
  • $\begingroup$ @belisarius Quit kernel? There's an app for that... $\endgroup$ Commented Nov 8, 2012 at 19:49

3 Answers 3

4
$\begingroup$

I am on Windows and palettes go away just like you describe. It gets fixed by changing the default WindowFrame option away from "Palette"

EDIT

It seems that changing WindowFrame disables the window floating behaviour also when Mathematica has focus. So, this would be equivalent to setting WindowFloating to False. This last option would at least keep the "Palette" looks.

If you try creating a dialog instead of a palette, and setting its WindowFloating property to True, then this behaviour also starts happening. So this seems quite unavoidable and buggy

$\endgroup$
3
  • 1
    $\begingroup$ I am on Windows7 and palettes only go away if they are covered by windows of the other application if it gets focus. If its windows do not cover the palettes, they remain happily and visible wherever they were. $\endgroup$ Commented Nov 8, 2012 at 19:54
  • $\begingroup$ @SjoerdC.deVries, so, for you palettes behave the same way as any other MMA window when MMA doesn't have focus. That's not the problem he and I face. But you made me realise that he probably intends the solution to make the palette remain on top of everything, so my answer isn't a solution $\endgroup$
    – Rojo
    Commented Nov 8, 2012 at 19:59
  • $\begingroup$ @Rojo I don't need it to remain on top, just not to disappear. Your answer is a solution, except I'd like to keep the frame thin. But that's a minor cosmetic thing. $\endgroup$
    – Szabolcs
    Commented Nov 8, 2012 at 20:01
3
$\begingroup$

In the Option Inspector there is the option Notebook Options >> Window Properties >> WindowFloating. If I make a palette editable and set this option to False, the palette loses the behavior you want to suppress.

$\endgroup$
2
  • $\begingroup$ But this would have the side-effect of supressing normal palette being-on-top behaviour while MMA does have focus, right? Oh, so does mine. Grr. +1 $\endgroup$
    – Rojo
    Commented Nov 8, 2012 at 21:25
  • $\begingroup$ @Rojo. Yes, the two effects are not separable. $\endgroup$
    – m_goldberg
    Commented Nov 9, 2012 at 0:54
1
$\begingroup$

On Mac OS X, drag and drop between apps can work like this. Say you want to drag the Mathematica SE logo from Safari to a Mathematica palette:

1: In Safari, start dragging, click and hold. Other apps may be hidden at this point: grab one

2: While holding the mouse button, use Command-Tab to switch to another app, ie Mathematica. Mathematica returns to the foreground and the palettes re-appear. grab 2

3: Release the mouse to drop the dragged item somewhere in Mathematica. grab 3

Well, in this case it actually copied the URL rather than the image, but you get the idea...

Is this what you're trying to do?

$\endgroup$
3
  • $\begingroup$ What did you do in order to allow something to be added to the Basic Math Assistant palette? I presume you had at least to change options for the palette to Editable, but how did you do that? $\endgroup$
    – murray
    Commented Nov 9, 2012 at 14:47
  • $\begingroup$ @murray I'm sorry for misleading you - I was tyring to show how to drag things into Mathematica so that the palettes were visible. In fact, I don't have any palettes that accept drag-and-drop items, to my knowledge, and I know nothing about how to edit them... $\endgroup$
    – cormullion
    Commented Nov 9, 2012 at 16:45
  • $\begingroup$ that was dumb of me to so misinterpret! $\endgroup$
    – murray
    Commented Nov 9, 2012 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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