# Palette with editable InputField

I need a Palette with editable InputField.

When I try the code CreatePalette[Pane[InputField["Enter a string"]]] it makes the pallete but all input goes into an open notebook, not into the InputField.

I just need a Palette with editable InputField. How it can be done?

-
Palettes seem to be made for buttons, I'm pretty sure you need CreateDialog. – Kurt Mar 30 '15 at 17:34
Care to provide some code to show how CreateDialog can be used to address the OP's issue? It would make your answer more helpful and probably solicit some rep. – bobthechemist Mar 30 '15 at 17:54

The following code should fix the problem:

CreatePalette[Pane[InputField["Enter a string"]], WindowFloating -> False,
WindowClickSelect -> True];


But as we figured out it is not!

I read all available information about WindowClickSelect and WindowFloating options in Mathematica documentation.

I didn't find any notices that we can't use the options simultaneously. I also didn't find any cautions that we can't use the options with Mathematica palettes.

Thus, such unexpected behavior is probably a bug in Mathematica. I advice to contact Wolfram support team regarding this bug.

-
It works! :) Thank you Helen! – Norb Mar 15 '12 at 7:41
I found strange behavior. When use this option I can't execute a cell anymore (Mathematica beeps). F1 to open help system and Ctrl+S to save the nb doesn't work correctly. – Norb Mar 15 '12 at 7:49
Try to set the option WindowFloating to False. – helen Mar 15 '12 at 8:02
WindowFloating really helps. But when I use these options, another problems have arisen. As far as I understand, now the focus of the palette on the InputFiles. So, when I try to use another Mathematica palette to paste something to the notebook, it is pasted into the InputFiled of the my palette. Moreover, I can't use PasteButton in my palette (Mathematica beeps again). So, even with these options I can't create the pallete that works correctly. – Norb Mar 15 '12 at 8:26

It seems you can't have everything in one, but maybe everything in 1.5 will be ok:

CreatePalette[
DynamicModule[{string = ""},
Pane[
Button[
InputField[Dynamic@string, String],
string = InputString["", string],
Appearance -> None, Method -> "Queued"
]]]

];

-