Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Examples

Can we have an example of the xml record that created the 'SRP Ribbon Control Tester' plus also the create event code. I dont quite get the inserting of an existing window into the ribbon control window.

Comments

  • Here is my entire CREATE event logic for my test window:
    // Read the XML from a table and pass it to the Init method SetupXml = Xlate("SETUP", "RIBBON_TEST", "", "X") Send_Message(@Window:".OLE_RIBBON", "OLE.Init", SetupXml) // Start an OI window and embed it into a backstage page PageWin = Start_Window("COPY_TABLE", "") Handle = Get_Property(PageWin, "HANDLE") Send_Message(@Window:".OLE_RIBBON", "OLE.EmbedWindow", "INFO", Handle) PageWin = Start_Window("COPY_ROW", "") Handle = Get_Property(PageWin, "HANDLE") Send_Message(@Window:".OLE_RIBBON", "OLE.EmbedWindow", "RECENT", Handle) // Qualify all events Send_Message(@Window:".OLE_RIBBON", "QUALIFY_EVENT", "ALL_OLES", 1)
    Here is the entire XML. Note that you'll have to change the icon directories and what not, but it should give you a good jumping off point.
    <Control Name="OLE_RIBBON" Window="NDW_RIBBON_TEST"> <Commands> <Command Key="FONTSIZEINCREASE" Caption="Increase Font Size" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\font_grow.png" Tooltip="Increases font size by one point." /> <Command Key="FONTSIZEDECREASE" Caption="Decrease Font Size" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\font_shrink.png" Tooltip="Decreases font size by one point." /> <Command Key="CHANGECASE" Caption="Change Case" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_change_case.png" Tooltip="Sets the selection to uppercase." /> <Command Key="CLEARFORMATTING" Caption="Clear Formatting" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\font-remove.png" Tooltip="Removes all text formatting." /> <Command Key="BOLD" Caption="Bold" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_bold_small.png" Tooltip="Sets the weight to bold." /> <Command Key="ITALICS" Caption="Italics" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_italic_small.png" Tooltip="Sets the style to italics." /> <Command Key="UNDERLINE" Caption="Underline" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_underline_small.png" Tooltip="Underlines the selection." /> <Command Key="STRIKETHROUGH" Caption="Strikethrough" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_strikethrough_small.png" Tooltip="Strikes out the selection." /> <Command Key="SUBSCRIPT" Caption="Subscript" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_subscript_small.png" Tooltip="Turns the selection into a subscript." /> <Command Key="SUPERSCRIPT" Caption="Superscript" SmallIcon="W:\Icons\Axialis Icons\Flat Word Processing Set\png_format_32bpp_alpha\16x16\character_superscript_small.png" Tooltip="Turns the selection into a superscript." /> </Commands> <Tabs> <Tab Key="HOME" Caption="Home" KeyboardTip="H"> <Group Key="CLIPBOARD" Caption="Clipboard" OptionButton="true" Icon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\clipboard.png"> <SplitButton Key="SPL_PASTE"> <Command Key="PASTE" Caption="Paste" Shortcut="Alt+F1" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\clipboard_paste.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard_paste.png" Tooltip="Inserts text from the clipboard." /> <Button Key="BTN_PASTEWITHFORMAT"> <Command Key="PASTEWITHFORMAT" Caption="Keep Source Formatting" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\clipboard_paste.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard_paste.png" Tooltip="Inserts formatted text from the clipboard." /> </Button> <Button Key="BTN_PASTEMERGE"> <Command Key="PASTEMERGE" Caption="Merge Formatting" Enabled="False" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\clipboard-add2.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard-add2.png" Tooltip="Inserts text from the clipboard using the current selection's formatting." /> </Button> <Button Key="BTN_PASTETEXTONLY"> <Command Key="PASTETEXTONLY" Caption="Keep Text Only" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\clipboard.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard.png" Tooltip="Inserts text only from the clipboard." /> </Button> </SplitButton> <Button Key="BTN_CUT"> <Command Key="CUT" Caption="Cut" KeyboardTip="X" Shortcut="Ctrl+X" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard_cut.png" Tooltip="Copies the selection to the clipboard then deletes it." /> </Button> <Button Key="BTN_COPY"> <Command Key="COPY" Caption="Copy" KeyboardTip="C" Shortcut="Ctrl+C" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\clipboard_copy.png" Tooltip="Copies the selection to the clipboard." /> </Button> <Button Key="BTN_FORMATPAINT"> <Command Key="FORMATPAINT" Caption="Format Painter" SmallIcon="W:\Icons\Axialis Icons\Flat Imaging Set\png_format_32bpp_alpha\16x16\brush.png" Tooltip="Formats the selection." /> </Button> </Group> <Group Key="FONT" Caption="Font" OptionButton="true" GroupControls="true" Tooltip="Displays the Font Chooser."> <ComboBox Key="COB_FONTFACE" Tooltip="Sets the selection's font family."> <Item>Arial Black</Item> <Item>Segoe UI</Item> <Item>Tahoma</Item> </ComboBox> <ComboBox Key="COB_FONTSIZE" Width="32" Tooltip="Sets the selection's font size."> <Item>8</Item> <Item>9</Item> <Item>10</Item> <Item>11</Item> <Item>12</Item> </ComboBox> <Button Key="BTN_FONTSIZEINCREASE" Command="FONTSIZEINCREASE" BeginGroup="true" /> <Button Key="BTN_FONTSIZEDECREASE" Command="FONTSIZEDECREASE" /> <Button Key="BTN_CHANGECASE" Command="CHANGECASE" BeginGroup="true" /> <Button Key="BTN_CLEARFORMATTING" Command="CLEARFORMATTING" BeginGroup="true" /> <Button Key="BTN_BOLD" Command="BOLD" BeginGroup="true" /> <Button Key="BTN_ITALICS" Command="ITALICS" /> <Button Key="BTN_UNDERLINE" Command="UNDERLINE" /> <Button Key="BTN_STRIKETHROUGH" Command="STRIKETHROUGH" /> <Button Key="BTN_SUBSCRIPT" Command="SUBSCRIPT" /> <Button Key="BTN_SUPERSCRIPT" Command="SUPERSCRIPT" /> </Group> <Group Key="PARAGRAPH" Caption="Paragraph" OptionButton="true" Tooltip="Displays the Paragraph window."> <CheckBox Key="CHB_TEST" Caption="Check Me" Shortcut="Ctrl+H" Tooltip="This is a check box." /> <DateField Key="DTF_TEST" Width="80" Height="22" Tooltip="This is a date field." /> </Group> <Group Key="STYLES" Caption="Styles" OptionButton="true" Tooltip="Displays the Style Chooser." /> <Group Key="EDITING" Caption="Editing" /> </Tab> <Tab Key="INSERT" Caption="Insert" KeyboardTip="N"> <Group Key="PAGES" Caption="Pages" /> <Group Key="TABLES" Caption="Tables" /> <Group Key="ILLUSTRATIONS" Caption="Illustrations" /> <Group Key="APPS" Caption="Apps" /> <Group Key="MEDIA" Caption="Media" /> <Group Key="LINKS" Caption="Links" /> <Group Key="COMMENTS" Caption="Comments" /> <Group Key="HEADERFOOTER" Caption="Header & Footer" /> <Group Key="TEXT" Caption="Text" /> <Group Key="SYMBOLS" Caption="Symbols" /> </Tab> <Tab Key="DESIGN" Caption="Design" KeyboardTip="D"> <Group Key="DOCFOMATTING" Caption="Document Fomatting" /> <Group Key="DOCSYMBOLS" Caption="Symbols" /> </Tab> <Tab Key="PAGELAYOUT" Caption="Page Layout" KeyboardTip="P"> <Group Key="PAGESETUP" Caption="Page Setup" /> <Group Key="PAGEPARAGRAPH" Caption="Paragraph" /> <Group Key="ARRANGE" Caption="Arrange" /> </Tab> <Tab Key="REFERENCES" Caption="References" KeyboardTip="R"> <Group Key="TOC" Caption="Table of Contents" /> <Group Key="FOOTNOTES" Caption="Footnotes" /> <Group Key="CITATIONS" Caption="Citations & Bibliography" /> <Group Key="CAPTIONS" Caption="Captions" /> <Group Key="INDEX" Caption="Index" /> <Group Key="AUTHORITIES" Caption="Table of Authorities" /> </Tab> <Tab Key="MAILINGS" Caption="Mailings" KeyboardTip="M"> <Group Key="CREATE" Caption="Create" /> <Group Key="MAILMERGE" Caption="Start Mail Merge" /> <Group Key="INSERTFIELDS Caption="Write & Insert Fields" /> <Group Key="PREVIEWRESULTS" Caption="Preview Results" /> <Group Key="FINISH" Caption="Finish" /> </Tab> <Tab Key="REVIEW" Caption="Review" KeyboardTip="E"> <Group Key="PROOFING" Caption="Proofing" /> <Group Key="LANGUAGE" Caption="Language" /> <Group Key="COMMENTS" Caption="Comments" /> <Group Key="TRACKING" Caption="Tracking" /> <Group Key="CHANGES" Caption="Changes" /> <Group Key="COMPARE" Caption="Compare" /> <Group Key="PROTECT" Caption="Protect" /> </Tab> <Tab Key="VIEW" Caption="View" KeyboardTip="V"> <Group Key="VIEWS" Caption="Views" /> <Group Key="SHOW" Caption="Show" /> <Group Key="ZOOM" Caption="Zoom" /> <Group Key="WINDOW" Caption="Window" /> <Group Key="MACROS" Caption="Macros" /> </Tab> <Tab Key="DESIGNTABLE" Caption="Design" ContextColor="Yellow" ContextCaption="Table Tools"> <Group Key="DESIGNTABLESTYLEOPTIONS" Caption="Table Style Options" /> <Group Key="DESIGNTABLESTYLES" Caption="Table Styles" /> <Group Key="DESIGNTABLEBORDERS" Caption="Borders" /> </Tab> <Tab Key="LAYOUT" Caption="Layout" ContextColor="Yellow" ContextCaption="Table Tools" Visible="True"> <Group Key="LAYOUTTABLE" Caption="Table" /> <Group Key="LAYOUTTABLEDRAW" Caption="Draw" /> <Group Key="LAYOUTTABLEROWSCOLS" Caption="Rows & Columns" /> <Group Key="LAYOUTTABLEMERGE" Caption="Merge" /> <Group Key="LAYOUTTABLECELLSIZE" Caption="Cell Size" /> <Group Key="LAYOUTTABLEALIGNMENT" Caption="Alignment" /> <Group Key="LAYOUTTABLEDATA" Caption="Data" /> </Tab> </Tabs> <QuickAccessControls> <Button Key="BTN_SAVE"> <Command Key="SAVE" Caption="Save" KeyboardTip="S" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\save.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\save.png" Tooltip="Saves the document." /> </Button> <Button Key="BTN_UNDO"> <Command Key="UNDO" Caption="Undo" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\undo.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\undo.png" Tooltip="Reverts the last change." /> </Button> </QuickAccessControls> <Backstage> <Button Command="SAVE" /> <Button> <Command Key="SAVE_AS" Caption="Save As" KeyboardTip="A" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\save.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\save.png" Tooltip="Saves the document to the selected file." /> </Button> <Button> <Command Key="OPEN" Caption="Open" KeyboardTip="O" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\folder_open.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\folder_open.png" Tooltip="Opens a new document." /> </Button> <Page Key="INFO"> <Command Key="INFO" Caption="Info" KeyboardTip="I" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\info.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\info.png" Tooltip="The document's metadata." /> </Page> <Page Key="RECENT"> <Command Key="RECENT" Caption="Recent" KeyboardTip="R" Tooltip="Recent Files." /> </Page> <Button> <Command Key="PRINT" Caption="Print" KeyboardTip="P" LargeIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\32x32\print.png" SmallIcon="W:\Icons\Axialis Icons\Flat Basic Set\png_format_32bpp_alpha\16x16\print.png" Tooltip="Prints the document." /> </Button> <Button> <Command Key="SHARE" Caption="Share" KeyboardTip="H" Tooltip="Shares the document with other users." /> </Button> <Button> <Command Key="EXPORT" Caption="Export" Tooltip="Exports the document to other formats." /> </Button> <Button> <Command Key="CLOSE" Caption="Close" KeyboardTip="X" Tooltip="Closes the application." /> </Button> </Backstage> <TabBarControls> <Button Key="BTN_MINIMIZE"> <Command Key="MINIMIZE" Caption="Minimize" Tooltip="Toggles the Ribbon." /> </Button> </TabBarControls> </Control>
Sign In or Register to comment.