DomainUpDown

Hi all,

do i have to override this Control if I need to make use of the up and down buttons

Thanks



Answer this question

DomainUpDown

  • --David

    Tryst wrote:

    do i have to override this Control if I need to make use of the up and down buttons

    Depends on what you mean by "make use of the up and down buttons". Handling the SelectedItemChanged event will make use of those buttons. If you want to do something specific to your control when the up or the down button is pressed, yes, you have to derive from this class and override the UpButton and DownButton methods.

  • Steve from adzac

    Well, I have a domain control that holds the values (00, 05, 10....55) which represents minutes in increments of 5. These values are added to the Domain's collection property.

    What my application does is gets the current time, and rounds to the nearest 5th minute. So, when my user creates a new Inspection on the handheld, the Domain Control pops up and displays the minute rounded to the nearest 5, but when I press the up or down arrow the next value to be displayed is 00, even when the orginal minutes shown is, for example 40. What I want is for it to either go down to 35 or up to 45, depending on what button was pressed.

    Is it possible to do this


  • gregaug

    ...I'll move it over.

  • MrJP

    Hi Peter,

    it seems there is no way for me to override the UpButton and DownButton events of the DomianUpDown Control in the Compact Framework. I get errors when simply compiling the following, and it doesn't state anything on the MSDN about the Compact Framework having the possibility of overriding this properties/methods...

    public override void UpButton()
    { }

    So is this a fact, that users have now way of determining which of the buttons was pressed by the user in the DomainUpDown control

    Thanks


  • fatquack

    OK - is there any chance you can move this thread to that forum

    (Saves me from having to start a new thread).

    Thanks


  • CramsterRk

    You didn't mention you were using CF. The DomainUpDown is very limited on CF. You might want to head over to the .NET Compact Framework forum to see if any of the CF experts have done any DomainUpDown customization in CF.

  • DomainUpDown