Talk:GUI enabling/disabling of controls

From Rosetta Code
Revision as of 14:27, 23 August 2010 by MikeMol (talk | contribs) (A little convoluted)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A little convoluted

I see parts of input validation and control manipulation here, and I suspect they really ought to be slightly more separate, or at least presented in a more common fashion. For example, by keeping the input, increment and decrement controls, and having an "Accept" button that closes the program, but only if the value is within a valid range. The input field should reject values outside its configured range.

Also, some platforms (Win32 at least) have the potential for message spoofing, which means it's possible for a sufficiently trusted program to cause the appearance of, e.g. a button press, even if the button control is disabled using EnableWindow(FALSE), so the programmer should seriously consider reverifying the input data on the "Accept" press. --Michael Mol 14:27, 23 August 2010 (UTC)