5
$\begingroup$

I want to make an InputField with a horizontal cursor, like this:

enter image description here

Note that the blinking cursor should be horizontal and not the mouse pointer! Nevertheless, text input should still be horizontal and not vertical. The code below shows an InputField with the standard vertical cursor but I want a horizontal one.

x = Null;
Style[InputField[Dynamic[x], ImageSize -> {180, 60}, Alignment -> Center], Bold, 20]

Is this possible?

$\endgroup$
  • $\begingroup$ Rotate[Style[InputField[Dynamic[x], ImageSize -> {180, 60}, Alignment -> Center],Bold, 20], Pi/2]. $\endgroup$ – cormullion Feb 12 '13 at 11:24
  • $\begingroup$ @cormullion Thanks for the answer,that was great ! however I am trying to get a horizontal inputfield as well as a horizontal cursor. $\endgroup$ – subbu Feb 12 '13 at 11:32
  • $\begingroup$ I think this works. x = Null; l = Graphics[{Thick, Line[{{0, 0}, {.07, 0}}]}]; MouseAppearance[ Style[InputField[Dynamic[x], ImageSize -> {180, 60}, Alignment -> Center], Bold, 20], l] $\endgroup$ – Ajasja Feb 12 '13 at 11:38
  • $\begingroup$ Or perhaps I'm still misunderstanding and the blinking cursor for text should be horizontal? $\endgroup$ – Ajasja Feb 12 '13 at 11:42
  • $\begingroup$ @Ajasja I want horizontal cursor with in InputField not mousePointer. $\endgroup$ – subbu Feb 12 '13 at 11:46

Your Answer

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

Browse other questions tagged or ask your own question.