|
-
Aug 8th, 2000, 08:41 AM
#1
Thread Starter
Lively Member
Probably a dumb question but how do you add icons to a toolbar control??
-
Aug 8th, 2000, 08:51 AM
#2
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
-
Aug 8th, 2000, 08:51 AM
#3
Fanatic Member
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.
-
Aug 8th, 2000, 09:28 AM
#4
Thread Starter
Lively Member
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?
-
Aug 8th, 2000, 09:34 AM
#5
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.
-
Aug 8th, 2000, 10:24 AM
#6
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|