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

Recommended Answers

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

Jump to Post

All 3 Replies

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

Thanks for pointing me in the right direction!

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.