Custom Drop Down Menu in a Custom Word Content Control - ms-word

I'm able to create a DropDown ContentControl in word such that a user can select an item from the drop down and that item becomes the text displayed in the ContentControl. However I've noticed that when you create a citation that drop down list contains command items that can launch dialogs. Is there any way to replicate this behaviour but with custom content controls that launch custom dialogs.

Apparently this is impossible as mentioned in the link below because:
This isn't a "standard" content control. This is something Word puts around a Citation field (and around Date fields and some other kinds). But the functionality is Word-internal and proprietary. It's not something that's exposed in the API. IOW, you can't do that, I'm afraid...
http://social.msdn.microsoft.com/Forums/vstudio/en-US/40542235-1a32-45e6-9aef-55709021ce53/how-do-i-create-a-contentcontrol-with-a-menu-like-when-inserting-a-placeholder?forum=worddev

Related

Display static, selectable text in GTK app

I am trying to build a small GTK 4 app where the user inputs some data, the program does some computations, and it outputs results in a tabular format.
Currently, I have implemented this using a GtkGrid with Label objects showing the results. This works, but a major downside is that the text is not selectable by the user.
Is there a standard Gtk interface for outputting static, selectable text or tables? For example, in the Firefox (whose Linux version is based on GTK) settings page, you can use the cursor to select all the explanatory text.
Searching for "text" in the GTK documentation brings me to the Text Widget Overview page, which is all about multiline text editing. But I don't want my output to be editableโ€”I just want the user to be able to highlight the text and paste it somewhere else if they want.
GtkLabel has a "selectable" property which does just that. It's also mentioned in a separate section of the GtkLabel docs

Typo3, set title for Mask Elements

I have a typo3 server and using the mask extension. When an editor creates a new mask element, there isnt a title in the list view. Its always "no title":
I checked the database and found the titles in the db in the field: tt_content.header but no way to set them automatically oder manually by an editor. Anyone have an idea how the title can be set automatically? Oder manually by an editor?
ext:mask has the option to reuse existing fields of tt_content for new kinds of content elements (CEs). use it to get the bonus of better interoperability with TYPO3.
TYPO3 has a logic how to show records (content elements) in the backend. one of it is the usage of the fields header and description. if you reuse these fields your CEs will look like others automatically.
If you use other fields you need to declare your fields for usage AND in case you change the kind of a CE from your kind to e.g. TEXT with Media the header stays.
Especially header is handled in the layout/partial of FSC or CSC global for any kind of CE. if the handling/rendering is changed (e.g. special layout) in an installation your CEs need special effort if they have their own building of the header.
Try to use the same fields as existing CEs and your life can be easier.
I'm having the same issue, but I found a way around it for the meantime. I edit the mask element and chenge its type to something elseโ€”like Textโ€”where I can set the title. After typing the title I save it, then change back to mask element and save again. This works by me without losing the content of the mask element. This way I can see the title in typo3 backend when I view as list or page or add content from another page. As I said, it doesn't solve the problem, but can help until there is a proper solution.
EDIT
I've just found another solution. You can add the title field to en existing mask element. To do it, go to ADMIN TOOLS > Mask, click your mask element to edit it. Add a new item by dragging the ๐—ฆ๐˜๐—ฟ๐—ถ๐—ป๐—ด item (the one on top of the list of available items) to the right where your items are. Then in General under ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ dropdown choose an ๐—˜๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด named:
๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ: (๐—ต๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ)
Save, close, go to your page to add your title. This still doesn't add the title field automatically to all mask elements, but it is a step forward.
If anywhere, you should be able to set a static title automatically in your page tsconfig. You could to something like
mod.wizards.newContentElement.wizardItems.mask.elements.[title of your mask element].tt_content_defValues {
header = My Awesome title
}
Personally, I usually give every mask element a header field and ask content editors to fill it in.
See also this discussion on Mask elements and backend titles.
Hope, this helps.

How can I add a custom column menu tab in ag-grid?

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2
What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.
This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.
I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

MS Word: change existing captions name

this is my first post, so I would like to say hello :)
I have a very large document, it consists of ~150 captions.
I would like to change name of the captions, for example from 'Picture' to 'Pic.'
Is there any simple method to do it? I can't imagine changing all of the existing captions and cross-references manualy.
Best regards,
Michal
Here is the way:
Select the caption with a number that has the label that you want to change.
For example, if you have "Picture 1", select the entire caption including label, sequence number, and the caption text.
On the References tab, in the Captions group, click Insert Caption.
In the Label dropdown, select the label that you want or click New Label and add a new one.
Solution found on Word Tips:
https://word.tips.net/T003888_Changing_Existing_Captions.html
"If you want to change some of the text in the captions, you need to modify the fields used to create the captions. (Automatic captions are implemented through the use of fields in the document.) You can change the text in the fields by first displaying the field codes in your document (press Shift+F9). You should be able to see what the field codes look like for your captions; examine one to see how it is constructed, looking specifically for the text you want to change.
Next press Ctrl+H to display the Replace tab of the Find and Replace dialog box. Use the controls in the dialog box to specify the caption text you want to change (from within the field you examined) and what you want the text to be. You can then use the controls to step through all the occurrences of the text and change it, as desired.
There are other things you can change in the fields using this same technique. For instance, you may want to change the numbering of your captions from Arabic to Roman. If you examine the field code used for a caption, it may appear similar to this:
{Seq Figure *\ arabic}
You can easily use the Find and Replace method to change the word "arabic" to "roman." When you are done making the changes, press Alt+F9 to change the field codes back to their results.
If your caption changing needs are a bit more complex (perhaps, for example, you want to change the caption to appear above a figure instead of below it, or vice-versa), then the best bet is to change the settings for automatic captions and then delete all the existing captions. You can then use cut and paste (cut the figure and paste it back in the same position) to force Word to automatically add the caption with the new settings."
you can edit individual captions by using Outline view.
(Update) To clarify: to edit an existing table (or I assume figure) individual caption, open your word doc in Outline View and select the caption you'd like to change.
If you want to batch edit you may be able to use find/replace in Outline view to batch find/replace all.
(Caveat: I was not able to easily edit a table caption while in Print View, so tested Outline View and it worked.)
Using the Find and Replace function changes both the cross references in the main text and in the captions.

Sitecore - how to persist a Layout change

I developed a Sitecore control I'd like to put into a layout on one page.
In this case it's a registration page, and my control is defined as a sublayout.
What I did is went into the Page Editor interface, and plonked the control into one of the placeholders.
What I want to do now is to create a package only containing the information that this control is on this particular page, without affecting e.g. the content or subitems of this node.
Can you please advise on the best way to create such packag, what exactly to select in the Package Designer?
Thanks
I don't believe the Package Designer gives you granular control to include just specific fields of an item. You need to add the item as whole.
You should configure layouts and renderings in the presentation details of an item OR even better in the __Standard Values of the template.
You can call the presentation details dialog through the content editor. Just select an item in the content tree, click on the Presentation tab in the top ribbon and select Details. You can configure all layouts/renderings for the selected item here.
But ff you want to prevent content changes you really SHOULD configure the presentation in the __Standard Values of the template. This is also the way, which is recommended by Sitecore. If you do this, the layouts are all you have to put into a package.