Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / August 2005

Tip: Looking for answers? Try searching our database.

Why don't my DomainUpDown controls behave correctly?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Osborne - 17 Aug 2005 15:01 GMT
I have used the DomainUpDown control in my UI to allow a user
to switch units from KB to MB to GB.
The initial text is set to MB.

When the form presents and I click on the upper arrow of the spin portion of
the control
nothing happens.

If I click on the down arrow a couple of times it changes selection and then
the up and down work
correctly.

I have seen this behavior in the simplest example I could produce.
   A WinForm with nothing on it but a DomainUpDown.
   There are three items defined for the control: KB,MB,GB.
   I set the text in the designer to MB.

Is this control just plain broke?
Bart Mermuys - 17 Aug 2005 17:19 GMT
Hi,

>I have used the DomainUpDown control in my UI to allow a user
> to switch units from KB to MB to GB.
> The initial text is set to MB.

The DomainControl starts with nothing selected (SelectedIndex = -1), so you
can use the Text property to display something that's not in the list, like
"Please select something ....".

But if you want the DomainControl to start with a certain item selected,
then you don't need to set the Text property, but set SelectedIndex to the
index of the item you want, in your case that would be 1 since it's 0 based

Form_load (....)
{
   domainUpDown1.SelectedIndex = 1;    // MB
}

HTH,
Greetings

> When the form presents and I click on the upper arrow of the spin portion
> of the control
[quoted text clipped - 10 lines]
>
> Is this control just plain broke?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.