Results 1 to 6 of 6

Thread: Adding icons to toolbar

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Question

    Probably a dumb question but how do you add icons to a toolbar control??

  2. #2
    Guest
    1. Add a ToolBar with a button.
    2. Add an ImageList with an Image loaded.
    3. Add the following code to a CommandButton

    Code:
    ImageList1.ListImages(1).Key = "one"
    Toolbar1.ImageList = ImageList1
    Toolbar1.Buttons(1).Image = ImageList1.ListImages("one").Key

  3. #3
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    You add icons to a toolbar by adding the required icons to an image list control.

    You then link the image list and toolbar together.

    If you right click on the toolbar, the properties will appear. All you have to do is select the image list, then allocate which icons you want to whatever buttons.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119
    Can I do this without code? I bound the image list control, added my icons, and did it programatically but isnt there a way to do it no programatically?

  5. #5
    Guest
    Do you mean at design time?

    • Add a ToolBar and an ImageList
    • Load an Image into the ImageList
    • Select the properties of the Toolbar and select the General tab.
    • Change the ImageList ComboBox to ImageList1.
    • Go to the Buttons tab and click Insert Buttob
    • Change the Image property to 1 and click Apply.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119
    Thank you for the help. Here is an MSDN article I found that walks you through it step by step in case anyone else has this problem:

    http://msdn.microsoft.com/library/de...barcontrol.htm

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