Results 1 to 8 of 8

Thread: Toolbar question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2018
    Posts
    28

    Toolbar question

    I would like to have a collapsing toolbar similar to what is available in Access Navigation Window or Visual Studio where you can collapse it or hide it if you want to. Would this be another form and what if any controls would I have to include in the project window? I am using a Windows Form Design, I hope I am using the correct terminology.

    I am not sure if I want to have the toolbar contain a bunch of buttons for things or just text. What are the benefits/downfalls of each?

    Thanks

    Dave

  2. #2
    Hyperactive Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    490

    Re: Toolbar question

    Hello,

    I think I would go with a user control with a panel to contain what you want, a label for the title and a picture box for the small arrow on the side.

    regards
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2018
    Posts
    28

    Re: Toolbar question

    Delaney, can you be a bit more specific I am not understanding what you mean

  4. #4
    Hyperactive Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    490

    Re: Toolbar question

    a UserControl is a control you create yourself generally by adding other controls in it. It looks like a small form on which you add controls. you can manage shape,events as you want.
    https://docs.microsoft.com/fr-fr/dot...l?view=net-5.0
    https://www.codeguru.com/columns/vb/...sual-basic.htm
    https://flylib.com/books/en/2.654.1/...r_control.html this one is a very good tutorial
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2018
    Posts
    28

    Re: Toolbar question

    OK, I got it I think. Right now I am working on a second form that will open from a button on the first form just to see what I can come up with. I can always changed the opening function to something in the menu bar later.

  6. #6
    Hyperactive Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    490

    Re: Toolbar question

    I forgot to tell that once you created you UserControl, you can use it like any other control and put it on you form
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2018
    Posts
    28

    Re: Toolbar question

    Yes, I watched a video earlier about someone using a timer control which made no sense to me at all but them I realized what he was doing and I realized he was just using it as a vehicle to allow him to use code in that control so he could draw items in a bitmap on a form. That's the kind of stuff that I have trouble getting my head around at this point. These things seem natural to you seasoned folks but not to me yet but I am learning and that a positive thing, it's always good to learn something new. I am sure that I will be asking what seems like dumb questions but please bear with me. I learn from experienced people like you and others on the forums and am very grateful for your assistance and understanding.

    Thanks

    Dave

  8. #8
    New Member
    Join Date
    Nov 2020
    Posts
    3

    Re: Toolbar question

    Hi Dave
    If you're only going to use this once I wouldn't bother creating a user control.
    Just add a panel to your form and add a bunch of buttons to the panel.
    Add a button that collapses the panel down when you click the button and brings it back to normal size when you click it again.
    e.g. if the panels height is 500 when you click the button set the panels height property to say 100 and vice versa

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