NumericUpDown and Read-Only


Author
Message
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi,

If a NumericUpDown is set to read-only, then you can't type a value into the control but the arrow keys and spinner controls still allow values to be entered. I know the intercepting of the arrows keys can be turned off but I can't see a way of removing the spinner.

On a similiar note, is there a way to make a CheckBox read only?

Thanks in advance,

Aaron

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One little trick on the NumericUpDown is to set the Increment to 0 when in "read-only" mode and it will prevent the value from being changed.  A checkbox, on the other hand, is a little more difficult.  You can either make it disabled (probably not desirable) or handle the CheckChanged event and set the value back.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search