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.

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

share|improve this question
1  
On Windows, palettes appear to stay even when the FE loses focus, so perhaps this is a feature peculiar to Macs? –  Oleksandr R. Nov 8 '12 at 19:41
    
i.stack.imgur.com/pb0YR.png –  belisarius Nov 8 '12 at 19:41
    
@OleksandrR. So that's why it felt a little unusual ... I'll update the question. –  Szabolcs Nov 8 '12 at 19:41
1  
I am on Windows and palettes go away just like you describe. Right now, W8 –  Rojo Nov 8 '12 at 19:44
    
@belisarius Quit kernel? There's an app for that... –  Sjoerd C. de Vries Nov 8 '12 at 19:49
show 1 more comment

3 Answers

up vote 4 down vote accepted

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

share|improve this answer
1  
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. –  Sjoerd C. de Vries Nov 8 '12 at 19:54
    
@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 –  Rojo Nov 8 '12 at 19:59
    
@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. –  Szabolcs Nov 8 '12 at 20:01
add comment

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.

share|improve this answer
    
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 –  Rojo Nov 8 '12 at 21:25
    
@Rojo. Yes, the two effects are not separable. –  m_goldberg Nov 9 '12 at 0:54
add comment

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?

share|improve this answer
    
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? –  murray Nov 9 '12 at 14:47
    
@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... –  cormullion Nov 9 '12 at 16:45
    
that was dumb of me to so misinterpret! –  murray Nov 9 '12 at 20:40
add comment

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.