954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Button.enabled := ?

Hi,

New to programming.

I have three Editboxes and a button - I would like to know how to make Button1.Enabled := true when all editboxes have at least one character of input and := false when even just one of the editboxes has no imput in it - is there some way to get something continually checking whether there is something in all the boxes, and if there is one box with no data in it then the button becomes disabled?

Thanks

Crossbow888
Newbie Poster
2 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

See the help for TCheckBox.Checked and TCheckBox.OnClick. Or see how to use TTimer.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
 

Thanks for pointing me in the right direction!

Crossbow888
Newbie Poster
2 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

No need touse Timer. It is not safe (low priority) and is not correct. The correct solution would be to use the component and its TActionList. This component is specifically designed to do this. It gives a centralized management of form elements. Sure to check out and see the attached example.

Attachments Actions.zip (12.09KB)
Wolfgan
Junior Poster
101 posts since Jun 2010
Reputation Points: 34
Solved Threads: 14
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: