Results 1 to 5 of 5

Thread: NumericUpDown unit

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Location
    Sweden
    Posts
    21

    NumericUpDown unit

    I have seen programs using the NumericUpDown control that have a unit inside it (e.g. cm). Does anyone know how to do that?

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: NumericUpDown unit

    Are you referring to displaying "cm" in the box as well? If that's the case, then not to my knowledge, since only numbers can be entered into the box...

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: NumericUpDown unit

    How do you know its a NumericUpDown control? Maybe its a ListBox made to look like a NUD control?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: NumericUpDown unit

    There is also the DomainUpDown, which you can attatch right to the side of a numericupdown and make it look like one control, just handle the changed event of the domainupdown to convert the numbers inside the numericupdown.

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: NumericUpDown unit

    Quote Originally Posted by conipto
    There is also the DomainUpDown, which you can attatch right to the side of a numericupdown and make it look like one control, just handle the changed event of the domainupdown to convert the numbers inside the numericupdown.

    Bill
    Or you could just use a DomainUpDown in the first place. If you populate it programtically it's very easy to have a large number of steps without having to painstakingly add each one yourself. You could probably create an inherited, owner-drawn NumericUpDown that would allow you to include a unit, or there might already be one created by someone else available. The Code Project is the first place I look for stuff like that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width