Hi there, I'm new in c# and need to know how to get the position of the
cursor in a textbox control.
For example, let be the text : "My text", if the cursor position is behind
the "x", then the position is 5.
Thanks a lot.
--
*** Ygnacio Durán *** 4 11892
SelectionStart.
"Ygnacio Durán" <yduranArrobAmixmail.com> wrote in message
news:#2**************@TK2MSFTNGP10.phx.gbl... Hi there, I'm new in c# and need to know how to get the position of the cursor in a textbox control.
For example, let be the text : "My text", if the cursor position is behind the "x", then the position is 5.
Thanks a lot. -- *** Ygnacio Durán ***
Check out the SelectionStart property.
- Pete
"Ygnacio Durán" <yduranArrobAmixmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi there, I'm new in c# and need to know how to get the position of the cursor in a textbox control.
For example, let be the text : "My text", if the cursor position is behind the "x", then the position is 5.
Thanks a lot. -- *** Ygnacio Durán ***
On Mon, 2 Feb 2004 17:09:46 -0400, "Ygnacio Durán" <yduranArrobAmixmail.com> wrote: Hi there, I'm new in c# and need to know how to get the position of the cursor in a textbox control.
For example, let be the text : "My text", if the cursor position is behind the "x", then the position is 5.
It sounds like you're off on a bad idea, The position you describe
would be 6 not 5, but see the documentation for TextBox.SelectionStart
property.
regards,
bullshark
In his descriptions, he assumed the first character might have been at
position zero rather then one. Who among us have not maid an indexing
mistake. :)
"bullshark" <bu*******@scubadiving.com> wrote in message
news:at********************************@4ax.com... On Mon, 2 Feb 2004 17:09:46 -0400, "Ygnacio Durán"
<yduranArrobAmixmail.com> wrote:Hi there, I'm new in c# and need to know how to get the position of the cursor in a textbox control.
For example, let be the text : "My text", if the cursor position is
behindthe "x", then the position is 5.
It sounds like you're off on a bad idea, The position you describe would be 6 not 5, but see the documentation for TextBox.SelectionStart property.
regards,
bullshark This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hazzard |
last post by:
I just realized that the code I inherited is using all asp.net server
controls (ie. webform controls) and when I try to update textboxes on the
client side, I lose the new value of the textbox when...
|
by: Devinim ÞÖLEN |
last post by:
Hi;
I try to fetch data and show in the textbox as follows;
..
..
..
..
<asp:XmlDataSource Id="m_ChXmlDataSource" runat="server"...
|
by: Henry |
last post by:
Hi. I've also posted this at another discussion board and here is the
original question.
-------------------------
"I have this problem and I don't know what I can do. First of all, I have a...
|
by: Jon |
last post by:
Hello All,
I have a datalist whose itemtemplate contains a label and a textbox. The
label text is set on itemdatabound with the text, which is a question, from
the database column. Each question...
|
by: jason |
last post by:
Hello everyone. I am trying to write some custom command events into a
DataGrid. The command that is currently giving me trouble is an "Add"
custom command in the footer of a template column.
...
| |
by: melanieab |
last post by:
Hi,
If there's a textbox and the text entered is longer than what's visible (the
textbox length), how do you make it so that the beginning chunk of text is
visible (instead of the last part of...
|
by: WALDO |
last post by:
I have a .Net TextBox (TextBoxBase, really) in which I am appending about 20
lines of text per second. I use the AppendText() method to accomplish this.
This is a great substitute for taking the...
|
by: rn5a |
last post by:
I want to create a custom control that encapsulates a Button & a
TextBox. When the Button is clicked, the user is asked a question using
JavaScript confirm (which shows 2 buttons - 'OK' &...
|
by: garyusenet |
last post by:
I have a multiline textbox.
The size of the text box should be 75 characters wide, and 5 lines in
height like this: -
<---75 characters-->
<---75 characters-->
<---75 characters-->
<---75...
|
by: Randy |
last post by:
My situation is that I have a form on which a number of textboxes and
comboboxes are added dynamically based on interaction with the user.
As these controls are added, they are given names based on...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |