By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,989 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,989 IT Pros & Developers. It's quick & easy.

Static Text with Focus

P: n/a
I'm looking for a more elegant solution to this problem:

I have a usercontrol that is dynamically created at runtime. It gets
populated with some collection of controls based on peripjeral data - maybe
a couple of labels and a check box. I want the labels to be able to catch
focus. I want a user to be able to select the text so that the control can
be indicated as the target for some operation. But a label can't hold
focus.

I tried using a textbox and setting it to read only. Works, mostly, but
when the user selects it, they see a text input caret happily blinking, even
though they can't enter anything.

What's the best way to accomplish this?

Thanks.

Jerry
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can try using the Link Label.
"Rlrcstr" <rl*****@msn.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
I'm looking for a more elegant solution to this problem:

I have a usercontrol that is dynamically created at runtime. It gets
populated with some collection of controls based on peripjeral data -
maybe a couple of labels and a check box. I want the labels to be able to
catch focus. I want a user to be able to select the text so that the
control can be indicated as the target for some operation. But a label
can't hold focus.

I tried using a textbox and setting it to read only. Works, mostly, but
when the user selects it, they see a text input caret happily blinking,
even though they can't enter anything.

What's the best way to accomplish this?

Thanks.

Jerry

Nov 21 '05 #2

P: n/a
Rlrcstr,

This has in my opinion a simple answer, just a flat style button (the look
from a label).

Cor
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.