Results 1 to 10 of 10

Thread: need feedback on what control this is...

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    need feedback on what control this is...

    In the visual studio toolbox, all controls are grouped. And you can hide/show certain areas by headers. What control gives similar functionality in my own program? I would like to let the user control what they see on screen. It would be better if the sub-areas could contain text boxes for data entry.

    I played around with a treeview but it doesn't seem to be the same. For example i was unable to put the plus on the label itself instead of beside it.
    Last edited by Lord Orwell; Jun 5th, 2008 at 09:00 PM.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: need feedback on what control this is...

    Create a custom control that inherits from the UserControl class. Then you can override the OnMouseClick event so that when the top area of the panel is clicked, the panel reduces in size, so only that top area of the panel is shown. Use a Boolean value to store whether the Panel is "expanded" or "collapsed".

    When you "collapse" the Panel, first store it's Height in a variable (lets call is iExpandedHeight), then change the Panel's Height to, say, 32. Then when you "expand" the panel, simply change the Panel's Height to whatever was stored in the iExpandedHeight variable.

    You can then use custom painting to render the top section of the Panel in a different colour to the rest of it, and even paint a plus/minus sign here too.

    When you dock the Panel in a Form, any other Panel's you dock underneath it will move to take up space used by the previous Panel when it is collapsed, and move to allow more room when you expand the previous Panel.

    You can then place any controls you like inside these Panels, like TextBoxes for example.
    Last edited by dom_stapleton; Jun 6th, 2008 at 09:31 AM.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  3. #3
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: need feedback on what control this is...

    Here's an example of the basic mechanics of the control...

    I've left the OnPaint method blank as this is pretty self-explanatory (this is where you paint the header in a different color and where you draw the plus or minus sign).
    Attached Files Attached Files
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  4. #4

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: need feedback on what control this is...

    HMM well that looks right but i was hoping it would be somethign i could use at design time. I've never compiled a user control before. Could i add controls at design time with a compiled version of that?
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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

    Re: need feedback on what control this is...

    You would have to build upon the example and add a collection class of panels or something so that you could add new items to the collection at run time or in the IDE in your project.

    New controls in the VS IDE are not always released for developers to use. Look at the PropertyGrid control. It wasnt made available until .NET after all those years in classic vb.
    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

  6. #6
    Fanatic Member CodedFire's Avatar
    Join Date
    Aug 2007
    Location
    In Cog Neato
    Posts
    568

    Re: need feedback on what control this is...

    Actually if you use WPF, you could group an amount of expander controls into a panel and bobs your father.
    Languages: Visual Basic 05/08, C# 08
    IDE: Express Editions
    Framework: 2.0, 3.0, 3.5


    Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak

  7. #7

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: need feedback on what control this is...

    any rumors of a service pack for 2008? I am about to go back to 2005. About once every 2 days it seems, i have some kind of issue. Check the game project i am working on in my profile link. Now it's giving me unfound schema warnings. Before that (and a project restore) it was claiming i was declaring my form twice (from IDE-Created code)
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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

    Re: need feedback on what control this is...

    Might want this as a new thread.

    SP-1 is still in beta but you can download it here -> http://www.microsoft.com/downloads/d...displaylang=en
    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

  9. #9
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: need feedback on what control this is...

    control improvements such as the DataRepeater for Windows Forms and Office 2007 Ribbons
    Oooh that's going to put some custom control designers out of business (Well, the bad ones who rely on only that anyway).
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

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

    Re: need feedback on what control this is...

    Yea but I have only seen 2 really good ones and they were hundreds of dollars. All the others are usually really crappy way off "copies".

    Should be some time in the next month or three that SP-1 goes RTM. I wont install the Beta as its a beta and I dont want all the headaches from trying to uninstall a beta and cleaning it up etc.
    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

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