I've got a couple Qs.
I'm using the ExplorerBar and I'm having trouble with images. I want a separate image for each group, and for each item in those groups. I can't seem to make that happen. I've looked at the articles and other forum posts but nothing seems to work. I created an image list and assigned each group and each item to an image, but still nothing. I've done it for both Large and Small appearances.
Any ideas?
Also, I'd like to use the ribbon control but it's not in my control list. Does it not come with winforms?
Hello Sean,
Thank you for the update.
I am glad that you resolved the issue.
Thanks Mike, that did the trick. I was away at a conf last wk, but I just tried it and it works fine. I've got some other styling issues but I'll start individual threads for those.
Sean McCown said:When I added images (to both small and large appearances), they added just fine, but didn't display in the rendered object.
If you add the images and then go back in into the group designer at design-time, are all of the images still there? If not, then something is wrong on your system and the images are not getting serialized properly. That seems unlikely.
If they are still there, the the only explanation as to why they don't show up at run-time is that something in your code is clearing them out. Either removing the images, the ImageList, or maybe it's removing all of the groups and adding new ones.
That's the only thing I can think of that would possibly cause that.
Sean McCown said:I've attached my isl. I'll try to see if I can put together a project that has the same issues. For the record, I've tried it with all ResolutionOrder values and while it changes what the grid looks like, it still doesn't use all the styles.
I loaded your isl into AppStylist and I went to the grid tab, and I can see thatyour isl is, in fact, turning off themes. So that's good. And I can see that the scrollbars looks gray like the windows default and do not appear to be styled. And I see that your isl has a BackColor applied to the ScrollBar UIRole and the two child roles: ScrollBarVertical and ScrollbarHorizontal. And if I create a new isl and use those roles (or even just the ScrollBar role), it works. And the same is true on the UltraTree, so it's not specific to the grid.
So that says to me that there is some other role that is causing that role not to work. It's pretty tough to track this kind of thing down. It's process or elimination to figure out which other role is causing an issue. So what I do in a case like this is open up the isl and select the root-level role on the tree and press "*". This expands the entire tree. Then I go down the list and reset each role one at a time until I find the one that makes the ScrollBar styling show up. So I tried that and still couldn't get it to work.
But I ended up reducing it down to a very simple isl with nothing but the base and the ScrollBar roles. So that narrowed it down. The problem is the base role. You are explicitly applying a BackColor to the Base role. That means EVERY role on every object is going to resolve that color and it's going to cause all sorts of weird behavior. So you should never do that. The only thing you can really use the Base role for is to turn off themes.
So if you go to your Base role and reset the BackColor, that fixes it. You are also setting a couple of other properties on the Base role, so I recommend that you Reset the base role, then set Themed Element Alpha on the Base role to Transparent, so there's nothing else set on there. That will help you avoid problems like this in the future.
Ok, I'll be more clear.
When I added images (to both small and large appearances), they added just fine, but didn't display in the rendered object.
Yes, I meant StyleLibraryName.
By menu items, I mean groups. It's functioning as my menu so I called them menu items. But yeah, I have the same problems with both groups and group items.
I've attached my isl. I'll try to see if I can put together a project that has the same issues. For the record, I've tried it with all ResolutionOrder values and while it changes what the grid looks like, it still doesn't use all the styles.
Ok, here's my file. It made me zip it before I could upload.MenuBarME.zip
I took another quick look and I think I know what might be happening with the images in the group.
The image used in the header depends on the Style property of the ExplorerBar control.
For ExplorerBar and OutlookNavigationPane styles, it uses the large image. So that means you have to set the ImageListLarge and the AppearancesLarge properties.
But for the other styles (Listbar, Toolbox, and VisualStudio2005Toolbox), it uses the small images. So that means ImagesSmall and AppearancesSmall.
So check the Style and make sure you are using the correct set of images.