Force TextBox to show cursor
-
Is it possible to force a TextBox to show it's input cursor even though it's not active?
-
Is it possible to force a TextBox to show it's input cursor even though it's not active?
I don't think it's a good idea, because that would be confusing! Why would you do anything like that? And no I don't think it possible.
Work @ Network integrated solutions | Flickr | A practical use of the MVC pattern
-
I don't think it's a good idea, because that would be confusing! Why would you do anything like that? And no I don't think it possible.
Work @ Network integrated solutions | Flickr | A practical use of the MVC pattern
I want it because we're writing a custom autocomplete function. We show a popup list, but when the popup is shown it's not possible to see what part of the textbox is being edited.
-
Is it possible to force a TextBox to show it's input cursor even though it's not active?
No. And yes, that does suck, and it would confuse your users if you could do it.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
No. And yes, that does suck, and it would confuse your users if you could do it.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Well... If you read about my reason above, do you still think it will confuse my users? I think it will confuse my users not to have it.
-
Well... If you read about my reason above, do you still think it will confuse my users? I think it will confuse my users not to have it.
You can change what the selection is in the textbox, that makes more sense to me. But, the only way to get a cursor AFAIK is to focus on the textbox.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I want it because we're writing a custom autocomplete function. We show a popup list, but when the popup is shown it's not possible to see what part of the textbox is being edited.
After showing the popup list, return focus to the text box to allow the cursor to be displayed. Handle keypresses on the text box and when appropriate respond to them by navigating through the list. Or Implement your own custom text box class, inherited from the TextBox and handle the drawing of the cursor yourself. The first option is defiantly the easier.
Simon