Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - ImageManager replacement for ImageList?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ImageManager replacement for ImageList?

 Post Reply Post Reply
Author
Message
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: ImageManager replacement for ImageList?
    Posted: 21 October 2005 at 8:47am

Is the ImanageManager control CodeJock's replacement for the VB6 ImageList? I'm guessing not as it doesn't appear to support some of the same methods as the ImageList but I'm not clear on what the differences are --even after reading through the help.

Could someone shed additional light on the key differences? For example, must they be used in concert with one another or is one a direct replacement for the other.

Shawshank

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 9:38am
One advantage would be support for 32-bit alpha icons, another would be the ability to have a normal, hot, and disabled icon for each control, another would be the ability to have multiple image sizes for the toolbars.  You can also use these images with most of the other codejock controls.  You can even "mirror" images when using RTL mode.

It is designed to be used instead of the ImageList even though the methods\properties are different.

Hope this helped.
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 3:14pm

Perhaps you can enlighten me on the proper use of the ImageManager. I want to add all of my icons to the ImageManager control at design time (VB6). All of my icons are BMPs --not muliple icons in a single BMP but single icons. So to add them to the ImageManager I select Import/Export and then Import from Bitmap. I then browse to the 16x16 BMP file and select it. This drops me to a dialog titled "Import" where the icon is visible. I have four options ID, State, Device & Mask Color. ID value cannot be changed and has no value. The other values are proper so I select the Import button. This drops me back to the ImageManager Property Page where the icon does not appear. Why? Now, if I select the "New" icon on the Property Page I can set a value for ID. So just for fun I enter a 1. After selecting OK I'm dropped back to the ImageManager Property Page where I now see several icons --none of which are the icon I attempted to import! Why would that be? Not one of the icons now labeled as Normal, Hot, Disabled & Checked even come close to being the icon I imported. Why is that? Where did these icons come from? If try the process all over again in an attempt to add additional icons I cannot. No additional icons will ever appear --only the ones that I do not want nor know how they got in the ImageManager?

Any insight would be greatly appreciated.

Shawshank

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 3:25pm
When importing the icon, you have to "click" on the picture of the icons when it is displayed.  You will then see some highlighting as to which part of the icon you are importing.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 3:27pm
If you still have problems, tomorrow I will throw together a tutorial with pictures on how to do this.
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 4:01pm
I'm afraid that doesn't work for me. When I import I'm importing a single image (versus a BMP file that has multiple images). After I browse and select it and then am dropped back to the Import dialog where I can see the single icon I then click it. This causes a black rectangle to appear around it as a visual cue that I have selected it. I then click the Import button. Again, nothing appears in the Property Page window. If I then select the New Icon button and provide a integer value and select OK I then can see several icons --none of which are the icon I selected. So what part of what I am doing is not correct? Where do these phantom icons come from? I could understand if it was making for me Hot, Selected & Disabled icons but like I said, the icons that appear are not even remotely similar to what I imported. What gives? 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 9:55pm
Can you send me the bmp file you are trying to import?  also some screen shots of the mystery icons that appear.  thanks
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2005 at 11:56pm

The forum software will not allow me to upload a BMP file. I'd be happy to email it to you.

Here you see the initial dialog showing no icons are present. I then select the Import and Export button and then Import from Bitmap...

Note that I have selected the image. The ID value cannot be changed. I do not change any thing further on this dialog and dismiss it with the Import button.

Now I'm dropped back to the Property Page dialog where no icons are present.

I now select the "New Icon" button. Which gives me this dialog. I enter a value of i for the ID field. I then select the OK button which then drops me back to the Property Page dialog...

...where I now have some icons --but they don't look anything like the one I added! Why?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2005 at 7:30am
Ok, I see your problem.

You must first add the icon and give it an ID.  This is done by clicking the white document icon next to the scissors icon.  You do this for the ID of each icon you will add.  This will give you the red circle "default" icons you are seeing in the last picture.

Now you click the Import and Export button.  After you select your bitmap, you click the section of the bitmap you want to add, then you select the ID to assign it from the ID drop-down menu.

So it looks like you did this backwards.   Soyou would do steps in picture 4 and 5, then do picture 3 and select the id of "1" that you entered.

Hope this helps.
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2005 at 1:33pm
Many thanks! That was indeed the problem.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2005 at 11:46am

Here is the Tutorial I mentioned....This is for anyone else that might have trouble.


Question:
How do I add BitMap (.bmp) file into the CommandBars ImageManager Control at Design Time?

Answer:

  1. Start out by going into Form View of the form that contains the ImageManager Control. Now Right-Click on the ImageManager Control and select "Properties" as seen in the picture below.


  2. Click the Add New Blank Icon button. Note that no Icon IDs are listed because there have not been any added yet.


  3. Give the new icon an ID. Note that setting the CommandBar controls IconId property to this value will cause this icon to be used for that control. This ID will be the value that is used to identify the icon. This is the value that corresponds to the IconId of a CommandBar control (The IconId and Id of a control are the same value by default). In the picture below you can see that you can choose the width and height of the icon as well. This is useful when displaying different size icons in your toolbar and menus, such as allowing the user to use Large Icons. Once you have entered in an ID, click the OK button.


  4. You should now see the ID you just entered appear in the Icons List of the Properties dialog. Note that all the icons at this point will appear as a red circle with a line through it . This image just serves as a place holder until an image is added. To view or edit an Icon, just click on the ID of the Icon from the list of IDs on the left of the Properties dialog.


  5. Now Click on the Import and Export button (The currently selected ID does not matter as you will select this later). This will display a drop-down that gives you several options. Select Import from Bitmap from the drop-down.


  6. An Open file dialog will appear that allows you to search for the .bmp file that you want to import. Find the bmp file on your hard drive, click on the image name, then click Open.


  7. An Import dialog will now appear. You should now see the image you opened in this dialog. You now need to click on the image that you want to import. If you opened a sinlgle image bitmap, the all you need to do is click on the image to select it. If you opened a bmp file that contains multiple images, then you must click on the specific image you want from the file. The ID Combo will remain disabled until an images is selected\clicked.


    In the picture above, a 32-bit Alpha image was imported. Notice that Mask Color drop-down is disabled as it is not needed with Alpha icons. With Alpha icons, the transparency layer for that image will be used.

    In the picture below, a 24-bit image is imported which has no transparency layer. Notice that Mask Color drop-down is now enabled and it will auto-detect the color to use for transparency. You also have the option to choose your own mask color.


    Notice that the image has a black border displayed around it after it is selected\clicked. This indicated the image that will be imported. You will also see the the ID Combo is now enabled.


  8. Now select the ID from the ID Combo that you want to import the image to. The ID Combo will list all of the IDs for the icons you have added to the ImageManager control.


  9. Now click on the Import button. This will import the currently selected image into the ImageManager control with the ID you selected from the ID Combo.


  10. You will now be brought back to the Properties dialog. You can now see the Icon that was imported by clicking on the ID of the icon from the list of IDs on the left side of the dialog. To Import another icon, simply repeat this process.

    When a new icon is added, a normal, hot, disabled, and checked version of the icon is automatically generated. The normal version of the icon is displayed in the toolbar when the toolbar button is enabled and the mouse is not positioned over it. The hot icon is displayed when the mouse is over an enabled toolbar button. The disabled icon is displayed when a toolbar button is disabled. And the checked icon is displayed when the Checked property of the CommandBar Control that uses the icon is True.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.