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 posting. I have attached a simple sample application to demonstrates adding images to the ExplorerBar header and to the items.
In order to add image to the item you could use this code:
aGroup.Items[0].Settings.Enabled = DefaultableBoolean.False; aGroup.Items[0].Settings.AppearancesSmall.Appearance.Image = myImage;
To add an images to the group header you could use this code:
foreach (UltraExplorerBarGroup group in ultraExplorerBar1.Groups) { group.Settings.AppearancesSmall.HeaderAppearance.Image = myImage; }
In the sample I have also demonstrated how can you change the image of the expansion indicator, if you are interested .
Please let me know if you need further assistance.
Sincerely,Divya JainAssociate Software Developer
please find the attached sample.
ExplorerBarGroupImage.zip
You can create the ribbon using UltraToolbarmanager control from the control .toolBox.For more information refer to this online help document.
Thanks for that. I'll give it a try. One more question along the same lines... when I hover over my groups I get a square of orange gradient. I've combed through the settings and styles for 2 days and I can't figure out where it's coming from. Where can I check for hover actions? I've looked in my style and through the control designer... I've looked through every single option, and there are a lot of them.
Where is that coming from?
I am not very sure about your requirement, is it a tooltip? Could you provide a screenshot of your orange square gradient?
As you are talking about gradient I believe you are using isl and most probably this orange gradient is coming from that only.In that case, you have to modify the isl itself to remove/modify the orange gradient, open up the isl in AppStylist and then reset roles and states one at a time until it goes away.If you are not able to achieve it provide your isl file applied to my sample and attach it here for me to find that role for you.
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.