S
Sujay Ghosh
Hi,
Environment : VS 2005 / .NET 2.0 / Windows XP SP2
Requirement :
class MyTextBox : TextBox
{
// more code
}
When I run the application my text box caret blinks in its usual place ( at
the left ).
I want the cursor to be X pixels from the left of the text box and hence
the user can only enter data from that location.
I tried with SelectionStart += X pixels -- it did not work
Then I pinvoke SetCaretPos(X, Y ) - showed up the caret position properly.
Problem :
Though the caret position shows up properly, when I type text within my text
box, the text is taken from the 0th location .
How can I force the user to enter data from the X th location where the
cursor is placed .
NOTE : I have handled OnPaint to do some graphics drawing inside the
textbox... dont think this has any relevance with this query ; just FYI if
something is linked up to this .
Thanks in advance .
Sujay
Environment : VS 2005 / .NET 2.0 / Windows XP SP2
Requirement :
class MyTextBox : TextBox
{
// more code
}
When I run the application my text box caret blinks in its usual place ( at
the left ).
I want the cursor to be X pixels from the left of the text box and hence
the user can only enter data from that location.
I tried with SelectionStart += X pixels -- it did not work
Then I pinvoke SetCaretPos(X, Y ) - showed up the caret position properly.
Problem :
Though the caret position shows up properly, when I type text within my text
box, the text is taken from the 0th location .
How can I force the user to enter data from the X th location where the
cursor is placed .
NOTE : I have handled OnPaint to do some graphics drawing inside the
textbox... dont think this has any relevance with this query ; just FYI if
something is linked up to this .
Thanks in advance .
Sujay