Page view counter
How to get cursor coordinates from multiline text box and display listbox their
Last post 09-03-2008 3:01 AM by vijchn. 3 replies.
Sort Posts:
09-02-2008 8:23 AM
How to get cursor coordinates from multiline text box and display listbox their

Hi,

I am working in silverlight 2 beta 2,

I make multiline text box and I want to display list box at

cursor postion,

So how I got the cursor position and how I display the list box at different positions

please give me suggesstion

Thanks

 

 

 

 

 

 

vijchn

Loading...
Joined on 04-29-2008
Posts 37
09-02-2008 8:47 AM
Re: How to get cursor coordinates from multiline text box and display listbox their

Hi,

I think you want to get cursor position on mouse over of TextBox.(If i am wrong correct me).

You Can write a MouseEnter/MouseLeftButtonDown/MouseLeftButtonUp Handler for that and Can Get Mouse Position with Respect to that Object Example..(If you will Pass Object as Parameter to GetPositionn method you will get Relative Position)

void hlb_MouseEnter(object sender, MouseEventArgs e)

{

 Point position = e.GetPosition(null);

  string a =position.X.toString();

string b =position.Y.toString();



 

}


					                

Mark as answer if this post answered your question.

Harsh Bardhan

HarshBardhan

Loading...
Joined on 05-07-2008
Bangalore
Posts 1,161
09-02-2008 8:50 AM
Re: How to get cursor coordinates from multiline text box and display listbox their

HarshBardhan:

Hi,

I think you want to get cursor position on mouse over of TextBox.(If i am wrong correct me).

You Can write a MouseEnter/MouseLeftButtonDown/MouseLeftButtonUp Handler for that and Can Get Mouse Position with Respect to that Object Example..(If you will Pass Object as Parameter to GetPositionn method you will get Relative Position)

void hlb_MouseEnter(object sender, MouseEventArgs e)

{

 Point position = e.GetPosition(null);

  string a =position.X.toString();

string b =position.Y.toString();



 

}

 

 

And call this method using MouseMove event.

 

Bye.

Web_Horse

Loading...
Joined on 08-11-2008
Italia
Posts 55
09-03-2008 3:01 AM
Re: How to get cursor coordinates from multiline text box and display listbox their

 Hi,

Thanks for replay

The following code

void hlb_MouseEnter(object sender, MouseEventArgs e)

{

 Point position = e.GetPosition(null);

  string a =position.X.toString();

string b =position.Y.toString();

 }

Gives me the mouse cursor position,

But I need the cursor position that blinks in text box

so please give me right suggestion

Thanks

 

 

 

vijchn

Loading...
Joined on 04-29-2008
Posts 37
Microsoft Communities