LinkLabels

  • Thread starter Thread starter mick
  • Start date Start date
M

mick

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

mick
 
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?
 
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
 
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.
 
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
 
Back
Top