Hello!
I have a WinExplorerBar and I have two groups with a couple of items in each of them.
In the first group, I would like to show the items with images which are 32x32.
In teh second group, I would like to show the items with images which are 24x24.
Is this possible somehow?
I ma also thinking about the option of showing items with just text, but I cannot succeed with that either.
Thanks for any feedback!
/Henrik
Hello,
Items of UltraExplorerBar use two type of images, large 32x32 and small 16x16, depend of the Style of the group. This meant that you images assigned to Image property of AppearanceSmall/AppearanceLarge will be resized to fit into the available space (16x16 or 32x32). I assume that when you talk about images with 24x24 you want the size of the rendered image to be 24x24, in order to do this I will suggest you to configure your group to use large image 32x32 and then with the help of IUIDrawFitlter interface to draw the image with 24x24. I’ve implemented this approach into the attached sample, where the size of the drawn image is the same as this of the actual Image object. About the items which shouldn’t display any images you could configure this setting the UseDefaoultImage to false. Please review my sample and let me know if this is what you are looking for.
Please let me know if you have any further questions.
I missed your comments regarding "use default image". It is very clear!
Sorry for that...
Hello Zlatan,
Yes, by default items height is related to the Style property of the Group and also you could manually managed items height using code like:
ultraExplorerBar1.Groups[0].ItemSettings.Height = 24;
That is just great, it works perfectly.
So the only thing that I have to solve know is to adjust the text to the left. Is that possible?
If you are using large images of a size like 32x32, the left adjustment for the text seems to be 32 + some pixels.
Can this be reduced, so that the adjustment corresponds to the image size better?
I am not sure that I understand your requirement, the sample which I’ve provided you only adjust image size (what I meant I skip drawing of original image, and it actually draw image with in the original image rectangle). So the text alignment is not affected at all and with my sample I can see how the text should be adjusted (maybe my sample does not use the appropriate images which makes this issue obvious).
I am waiting for your feedback.
I am glad that you were able to solve your issue, please do not hesitate to contact with us if you have any further questions regarding this matter.
Thank you for using Infragistics Components.
What I mean is that if you use other image sizes together with the draw filter, the text doesn't follow.
But if I use Indent together with ItemSettings.Height, I can adjust it to look better...
groupFiles.ItemSettings.Height = ...
groupFiles.ItemSettings.Indent = ...
I think that it is all solved...
Thanks!