hi all
i wrote a simple text editor.
i am able to select text,
and drag/drop it onto other text editors.
however, when the mouse hovers over the selected text,
before draging it,
it remains an IBeam.
this is not desireable behaviour.
users expect the cursor to change into an arrow,
when hovering over selected text.
how do i change the cursor to arrow, when hovering over selected text?
assaf
Sijin Joseph - 14 Oct 2004 13:12 GMT
You can use Control.Cursor property to set the desired cursor for your
control when hovering.
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
> hi all
>
[quoted text clipped - 13 lines]
>
> assaf
assaf - 14 Oct 2004 13:41 GMT
hi joseph.
my question is:
how do i know that i am hovering over the selected text?
so that i will know to change the cursor into an arrow?
assaf
> You can use Control.Cursor property to set the desired cursor for your
> control when hovering.
[quoted text clipped - 20 lines]
> >
> > assaf
Sijin Joseph - 15 Oct 2004 04:40 GMT
You could use a RichTextBox instead of a textbox and then in the hover
event for the control use RichTextBox.GetCharIndexFromPosition() to get
the index of the char where the mouse is currently at and then use
SelectionStart property to determine if the index falls within selected
text.
Also i came across this enhanced texteditor control, you may want to
give it a try
http://sf.net/projects/wangdera
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
> hi joseph.
>
[quoted text clipped - 28 lines]
>>>
>>>assaf
assaf - 16 Oct 2004 08:05 GMT
bingo
> You could use a RichTextBox instead of a textbox and then in the hover
> event for the control use RichTextBox.GetCharIndexFromPosition() to get
[quoted text clipped - 42 lines]
> >>>
> >>>assaf