4
$\begingroup$

I want to use the following expression to get a string value:

Row[{"Enter index identifier: ", InputField[Dynamic[indexidentifier], String]}]

and I also want to hide the expression. When I evaluate the expression "in place," it works properly, but it put quotation marks around the Enter ... string.

It clutters up (to me) the notebook. Can I get rid of the quotes?

$\endgroup$
7
$\begingroup$

Use Style with the option ShowStringCharacters -> False around the prompt:

Row[{Style["Enter index identifier: ", ShowStringCharacters -> False],
   InputField[Dynamic[indexidentifier], String]}]

After evaluating in place:

enter image description here

Alternatively, you can use TextCell:

Row[{TextCell["Enter index identifier: "], InputField[Dynamic[indexidentifier], String]}]

enter image description here

$\endgroup$
  • $\begingroup$ Nice! I wasn't sure there was a way to do it. $\endgroup$ – George Wolfe Jul 19 '19 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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