Daniel,
Unfortunately, this isn't possible with the NumericUpDownControl. The
reason for this is that the control uses one window for the up/down buttons
(so you can't disable a specific button), and the control doesn't expose a
windows message or some other mechanism to disable only one button.
Does not setting the Maximum and Minimum properties on the control suit
your needs? It will prevent a values outside of that range from being
entered.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Bamse" <bd******@yahoo.com> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
(this was posted on microsoft.public.dotnet.framework.windowsforms too)
Hi,
Is there a way (.NET, P/Invoke) to access individual buttons in a
NumericUpDown and DomainUpDown controls?
I need to disable/enable each one of them separately
if the .Value is smaller than myMinValue, the upper button is disabled;
if the .Value is bigger than myMaxValue, the lower button is disabled and
the other one is enabled;
Thank you,
Daniel