0

I have a textbox and some buttons on a form in my windows application. The user can enter his data either from buttons or from the textbox. I want the buttons to look like they are being clicked when the user enters the data from the text box.

I mean while the user is typing in the textbox the related buttons look like they are being clicked.

I am using .Net and c#

Thank you.

H H
  • 263,252
  • 30
  • 330
  • 514
Ahmad Houri
  • 1,117
  • 4
  • 16
  • 26
  • 3
    4 years - crikey. I'll bet you can push water uphill with a rake too. – Tim Lloyd Feb 02 '11 at 17:01
  • do you mean disabled perhaps? whats the purpose of "look like it is being clicked"? – Kris Ivanov Feb 02 '11 at 17:01
  • 6
    This site is less than 3 years old.. – Blorgbeard Feb 02 '11 at 17:02
  • This site hasn't been up for 4 years ... – JaredPar Feb 02 '11 at 17:02
  • You'd have thought after using this site for 4 years you'd not how to phrase a good question :) – Moo-Juice Feb 02 '11 at 17:03
  • If you had been using the site for long, you would know better than to include "hi" in your question, or to tell us it's your first post. – John Saunders Feb 02 '11 at 17:04
  • 1
    @John: I say hi in all my questions! Are we not supposed to? – Phil Gan Feb 02 '11 at 17:10
  • I used to use 'hi' in all my quIestions. I thought I was being polite. But then I noticed people editing it out everytime. So I stopped. I guess it's bad form, but, am not sure. – 341008 Feb 02 '11 at 17:13
  • 3
    possible duplicate of [How to make a button appear as if it is pressed?](http://stackoverflow.com/questions/4913/how-to-make-a-button-appear-as-if-it-is-pressed) – Blorgbeard Feb 02 '11 at 17:16
  • @Phil @341008 Just "Hi" is ok, but a long preamble cuts into the summary text which is displayed in the question list. – Blorgbeard Feb 02 '11 at 17:20
  • @Phil: see http://meta.stackexchange.com/questions/2950/should-hi-thanks-and-taglines-and-salutations-be-removed-from-posts – John Saunders Feb 02 '11 at 17:31
  • please be patient a little with me , I am trying to learn how to use this site correctly , after all these comments I thought that I did a very big mistake!!!!......it is just a question – Ahmad Houri Feb 02 '11 at 17:32
  • Ahmad: I think your question was good, just not very well written, and maybe a duplicate. If [this question](http://stackoverflow.com/questions/4913/how-to-make-a-button-appear-as-if-it-is-pressed) doesn't help you, try asking again and try to be really clear about what you want. – Blorgbeard Feb 06 '11 at 22:07

1 Answers1

1

I believe I understand your question correctly:

You will need to create an event that triggers when someone types in the textbox(s), and then use btnName.Enabled = false in the event function.

Joel Kennedy
  • 1,581
  • 5
  • 19
  • 41