Ribbon Controls That Manage Rich Text
Jan 5 2012, 10:39 PM
Hi, I am creating a ribbon that is loaded with a form and this is using Contextual Tabs. It is working fine - up to a point.
I have some forms with Text Boxes that contain Rich Text. I can load the Bold, Italic, Underline Buttons ok. And they work fine. If the field is Rich Text then the group is enabled, if Plain Text then it is not.
I want to add the "Fonts" Combobox, "Font Size" Combobox and Format Painter ToggleButton - THIS is where i get totally stuck!!!
There are idMSOs for Word, and if you go to the Cutomise Quick Access Tool Bar - the commands appear and you can right click and get there names but they are not recognised.
ANY IDEAS gratefully received
Thanks in anticipation.
The code is below (that commeted out is what is causing the problem):
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="OnRepRibbonLoad" loadImage="LoadImages">
<tab id="frmTools" label="Data Controls">
<!-- Other Groups go in here -->
<group id="RichText" label="Text Formatting">
<labelControl id="jrLC01" label="Fonts" />
<!-- <combobox idMso="FontDialog" label="Size" />
<button idMSO="FormatPainter" label="Format" />
<button idMso="FontColorPicker" label="Font" /> -->
<toggleButton idMso="Bold" enabled="true" />
<toggleButton idMso="Underline" />
<toggleButton idMso="Italic" />
Jan 6 2012, 12:52 AM
From: Edmonton, Alberta Canada
If you want the rich text editing options, perhaps you just specify the GroupTextFormatting group?
With this xml:
<tab id="MyHome" label="Home">
<group idMso="GroupClipboard" />
<group idMso="GroupSortAndFilter" />
<group idMso="GroupFindAccess" />
<group idMso="GroupTextFormatting" />
I get this:
So that gives me a basic ribbon with rich text. I suppose you could look up each part and insert each control separate of the group, but I think just "lifting" the whole group is easy.
Keep in mind a REALLY fantastic reference (an Excel sheet) is what I used to find this (took me about 8 seconds) is the following reference:
I just did a ctrl-f and typed in "format"
A screen shot from Excel shows the rich text group:
I can safely say that when working with the ribbon, I have this Excel sheet loaded, I have the gallery open that shows ALL office icons as graphic. I don’t' remember where I download the icon gallery, but here is on here that runs in word:
Having all these tools open means it takes only seconds to grab/find/insert a new button, only seconds to see/view find a graphic icon, or insert a new group.
Also, note that some of the rich text group are NOT buttons, and specifying button will not work, you have to specify the correct type of control such as toggle, gallery etc.
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Jan 7 2012, 06:19 PM
Thanks VERY much for a complete and comprehensive reply. - Easy when you know how!
You have just saved me pulling that last few hairs out of my head (IMG:style_emoticons/default/pullhair.gif)
|Go to Top · Lo-Fi Version||Time is now: 19th June 2013 - 04:33 PM|