Although this has nothing to do with scripting, it is equally demanding: FrameMaker Customisation…
In my Enhance Tool Bars (ETB) I use flyout menus to reduce the number of buttons. There are now three of these flyouts (ETBPgfAlignPopup, ETBRulerTabsPopup, ETBPgfActionsPopup), which work well since FM-12.
For example for ETBPgfAlignPopup the menu file contains
<Command ETBPgfAlignPopup <Label ETB paragraph alignment…> <Definition \x914> <Param ETBPgfAlignMenu>> <Menu ETBPgfAlignMenu <Label Pgf Alignment…>> <Add LeftPara <Menu ETBPgfAlignMenu>> <Add CenterPara <Menu ETBPgfAlignMenu>> <Add RightPara <Menu ETBPgfAlignMenu>> <Add FullyJustifyPara <Menu ETBPgfAlignMenu>>
The toolbar contains
<FLYOUT command="ETBPgfAlignPopup" tooltip="Text alignment …"> <images base="etb_icons\text_align_left"/> </FLYOUT>
I wanted to combine the cell align buttons into such a flyout:
The menu file contains
<Command ETBCellAlignPopup <Label Cell Alignment… [ETB]> <Definition \x914> <Param ETBCellAlignMenu>> <Menu ETBCellAlignMenu <Label Cell Alignment… [ETB]>> <Add AlignTop <Menu ETBCellAlignMenu>> <Add AlignMiddle <Menu ETBCellAlignMenu>> <Add AlignBottom <Menu ETBCellAlignMenu>>
The toolbar contains
<FLYOUT command="ETBCellAlignPopup" tooltip="Cell Alignment…"> <images base="etb_icons\table_cell_align"/> </FLYOUT>
The result is depressing, if cursor is in a table cell:
I have not the slightest idea, why this does not work.
Has anyone out there in frame-space (even Adobe) an idea how to get this working?
Klaus, does the cell have to be selected?
Selecting the cell does not make any difference …
The menu entries use exactly the same commands as the 'single command' buttons. For example, the first entry in the drop-down menu is
<Add AlignTop <Menu ETBCellAlignMenu>>
Which uses the same command as the standard button
<ACTION command="AlignTop" tooltip="Align Top"> <images base="S_CELLTOP"/> </ACTION>
And for these - you know - it is sufficient to have the cursor in the cell.
IMHO there is a hidden condition for these pop-up menus: the three I already have and work as expected act on paragraphs. But the alignment of the cell contents is a pargraph property...
Key problem: the button does not become active - why not? Do I need some paramer at the Command ETBPgfAlignPopup definition - but all the existing do not have a special parameter.
I'm thankful that today is not April 1 - because it turns out that...
To look at the original behaviour I switched workspace to Authoring and made the Table Tool Bar visible.
After switching back to the ETB workspace what do I see: the tool bar icon for Cell Alignment is active and I can select the proper function and everything works as expected!
So t here seems to be a switch in the workspace file...