469,648 Members | 1,638 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

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 2013

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 gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.