4
$\begingroup$

Is it feasible to make an input field, that or similar functionality, that could be constantly updated while typing or editing, without clicking Enter button? The example is as follows:

{InputField[Dynamic[x]], Dynamic[Hash[x]]} 

I'd be glad to type in the field with each symbol Hash would updated.

$\endgroup$
4
$\begingroup$

You can use the option ContinuousAction->True to get the desired behavior, but this option only works for the Boxes, Number and String types. For example:

x = "";
{
    InputField[Dynamic[x], Boxes, ContinuousAction->True],
    Dynamic[ToExpression[x, StandardForm, Hash]]
}
$\endgroup$

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.