Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I´d like to set the Cursor into TextBox, behind its start text. Tried several methods, but I didn´t get it working.

.focus(), .select(), pointtoscreen() etc. Any other ideas, how to get this blinking one, into the TBox

Sometimes you´ve got to make a silent Takedown .
  • *Experts*
Posted

You want to move the caret ("the blinking one") to the end of the text right? This should help you: (I can't test it now)

TextBox1.SelectionStart = TextBox1.Text.Length

Posted
Nope! I even tried it before in a similar way. But your suggest doesn´t work proper as well. No caret blinkin in my TBox.
Sometimes you´ve got to make a silent Takedown .
Posted
i also looked at some other posts about this topic but i found the answer that everything works well with richtextbox but textbox wont work, but there must be a solution maybe you have to do an win32 call
  • *Experts*
Posted (edited)
NK2000, i just tested the code I showed and it works well. It will set the caret at the specified position. The textbox must of course have focus to show the caret at all. Edited by mutant
Posted
I ain´t gonna get it working, either with TBox nor RichTextBox and methods shown above. I guess its as usual. It won´t fit for me. Thanks MS. But I'll keep on trying and if something positive should happen, I´ll be reporting.
Sometimes you´ve got to make a silent Takedown .
Posted

Ok. It works just the way mutant wrote. But not in a ChildForm. It´s working fine within a Panel, which I took to replace the form.

 

 

Thanks so far guys, you helped me a lot.

Sometimes you´ve got to make a silent Takedown .

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...