472,142 Members | 1,275 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

Link Label Focus Issue

I have an issue in which a link label on a windows form does not draw the
focus rectangle if you programmatically force it to have focus via the
Control.Focus() method.

To duplicate, create a new windows app, place a button and a link label on
the form. In the button click event, place the following code,
this.linkLabel1.Focus(). Run the app and press tab between the two controls
and you notice that the link label has the focus rectangle, but if you put
focus on the button and click the button, the focus rectangle is not drawn
on the link label even though it has focus.

I've tried several methods to force the drawing of the rectangle, including
the WM_SETFOCUS and VK_TAB api's without luck.

Any ideas on how to force the drawing of the focus rectangle? (I'm trying
to avoid using the drawrect myself).

Thanks in Advance!

Steve Bezner

Nov 15 '05 #1
0 2075

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Steve Bezner | last post: by
5 posts views Thread by Brian Foley | last post: by
reply views Thread by Morten Wennevik | last post: by
5 posts views Thread by Rich Blackburn | last post: by
5 posts views Thread by Sharon | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.