LinkLabels

M

mick

Anyone know if there is a way of getting the coords of individual links in
a LinkLabel control?

mick
 
J

Jeff Johnson

Anyone know if there is a way of getting the coords of individual links
in a LinkLabel control?

Screen coordinates or character positions within the string?
 
M

mick

Jeff Johnson said:
Screen coordinates or character positions within the string?

I know how to get the coords of of the curser within the LinkLabel -

Point LocalMousePosition = linkLabel1.PointToClient(Cursor.Position);

but not how to tell if the mouse is over a particular link within it.

Without seeing a line of code I`m not sure what you mean.

mick
 
J

Jeff Johnson

I know how to get the coords of of the curser within the LinkLabel -

Point LocalMousePosition = linkLabel1.PointToClient(Cursor.Position);

but not how to tell if the mouse is over a particular link within it.

Without seeing a line of code I`m not sure what you mean.

I just wanted to be sure you were using the word "corrdinates" correctly,
and you were.

It looks like .NET provides no built-in way of doing what you want. You'll
probably have to resort to graphics functions to measure your string (the
text of the label) and decide for yourself what link the cursor is over.
 
M

mick

Jeff Johnson said:
I just wanted to be sure you were using the word "corrdinates" correctly,
and you were.

It looks like .NET provides no built-in way of doing what you want. You'll
probably have to resort to graphics functions to measure your string (the
text of the label) and decide for yourself what link the cursor is over.

No, I couldn`t find anything either. A workround should be easy enough
though. Thanks for your reply.

mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top