5

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?

István Zachar
  • 47,032
  • 20
  • 143
  • 291
subbu
  • 2,304
  • 1
  • 13
  • 32
  • Rotate[Style[InputField[Dynamic[x], ImageSize -> {180, 60}, Alignment -> Center],Bold, 20], Pi/2]. – cormullion Feb 12 '13 at 11:24
  • @cormullion Thanks for the answer,that was great ! however I am trying to get a horizontal inputfield as well as a horizontal cursor. – subbu Feb 12 '13 at 11:32
  • 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] – Ajasja Feb 12 '13 at 11:38
  • Or perhaps I'm still misunderstanding and the blinking cursor for text should be horizontal? – Ajasja Feb 12 '13 at 11:42
  • @Ajasja I want horizontal cursor with in InputField not mousePointer. – subbu Feb 12 '13 at 11:46
  • Hmm, interesting question then. Don't know the answer. – Ajasja Feb 12 '13 at 11:52
  • Why don't you adapt cormullion's answer to Rotate[Style[ InputField[Dynamic[x], ImageSize -> {60, 180}, Alignment -> Center],Bold, 20], Pi/2]? – partial81 Feb 13 '13 at 07:51
  • @partial81 I want horizontal inputField as well as horizontal cursor,but he did vertical inputfield – subbu Feb 15 '13 at 05:34
  • If you use my code (which is almost the same code as @cormullion's), you will get this - at least you get as output something which is as in your picture above. If this is not the desired output, you should change this picture. – partial81 Feb 15 '13 at 07:27

0 Answers0