Hi,
I have a ribbon with some ButtonTools on it.
Is there a way to show the images for the buttons on the left side of the text? currently it is located above the text.
Thanks,
Ziv
Hello Ziv,
The layout of the image and text of tools within the Ribbon is fairly strict. The tool displayed in your image is in the "Large" state. In this state, the text is always below the image. However, if you change the tool size to be "Normal", the image is located to the left of the tool caption. This can be accomplished by setting either the PreferredToolSize property on the RibbonGroup or the PreferredSizeOnRibbon property on the tool's InstanceProps to "Normal".
Note that when a tool is in its Large state, it will be sized to fill the height of the RibbonGroup. When it is in the Normal state, the tool is sized so it takes up 1/3 of the RibbonGroup's Height.
I hope this helps. Let me know if you have any questions.
Chris
Hi Chris,
Thanks for the reply.
Unfortunately, using the Normal size isn't quite good enough. I do need the large one.
Can I achieve my goal using creation filter or draw filter somehow? Is that an option?
Thanks again,
Hi Ziv,
Rearranging/resizing UIElements is the main function of a creation filter. However, it really is not feasible in this case. The size/layout of each of the containers (RibbonGroup, Ribbon, etc) is based on the precalculated size of the contained objects. If order to change the layout of the Image element relative to the Text elements of the tool, you would also have to resize and rearrange all the RibbonGroup elements to make space for the expand tool. Now what happens if there is no longer enough space to fit all the RibbonGroups. The precalculated sizing takes this into account and adds scroll buttons, but when items are rearranged with a creation filter, it is too late. I hope this make sense.
This makes perfect sense Chris. Thanks!