<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi Team,<div><span style="color:rgb(75,75,75);font-family:sans-serif;font-size:14px">I am a starter and want to know on How to add a drop down button with sub items (buttons or Text) using the xcu file that we give while creating an extension. My xcu file for toolbar items looks like below</span> </div><div><br></div><pre style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:12.025px;margin-top:0px;margin-bottom:18px;background-color:rgb(245,245,245);padding:2px;color:rgb(51,51,51);border-radius:4px;line-height:18px;border:1px solid rgb(136,136,136);white-space:pre-wrap;word-break:break-all;clear:both"><code style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;padding:0px;color:inherit;border-radius:3px;background-color:transparent;border:0px;clear:both"><span style="color:rgb(0,0,136)"><node</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"OfficeToolBar"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
        </span><span style="color:rgb(0,0,136)"><node</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"org.libreoffice.example.StarterProject.toolbar"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:op</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"replace"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
            </span><span style="color:rgb(0,0,136)"><prop</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"Title"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:type</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"xs:string"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"><value></span><span style="color:rgb(0,0,0)">Starter Project</span><span style="color:rgb(0,0,136)"></value></span><span style="color:rgb(0,0,0)">
            </span><span style="color:rgb(0,0,136)"></prop></span><span style="color:rgb(0,0,0)">
            </span><span style="color:rgb(0,0,136)"><node</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"t01"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:op</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"replace"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"><prop</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"URL"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:type</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"xs:string"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
                    </span><span style="color:rgb(0,0,136)"><value></span><span style="color:rgb(0,0,0)">service:org.libreoffice.example.StarterProject?actionOne</span><span style="color:rgb(0,0,136)"></value></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"></prop></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"><prop</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"Target"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:type</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"xs:string"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
                    </span><span style="color:rgb(0,0,136)"><value></span><span style="color:rgb(0,0,0)">_self</span><span style="color:rgb(0,0,136)"></value></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"></prop></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"><prop</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"Context"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:type</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"xs:string"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,136)"><value></span><span style="color:rgb(0,0,0)">com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</span><span style="color:rgb(0,0,136)"></value></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"></prop></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"><prop</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:name</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"Title"</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">oor:type</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"xs:string"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">
                    </span><span style="color:rgb(0,0,136)"><value</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(102,0,102)">xml:lang</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">"en-US"</span><span style="color:rgb(0,0,136)">></span><span style="color:rgb(0,0,0)">Action One</span><span style="color:rgb(0,0,136)"></value></span><span style="color:rgb(0,0,0)">
                </span><span style="color:rgb(0,0,136)"></prop></span><span style="color:rgb(0,0,0)">
        </span><span style="color:rgb(0,0,136)"></node></span><span style="color:rgb(0,0,0)"> </span></code></pre><div><span style="background-color:transparent;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;color:rgb(0,0,0)">  </span><span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px">I have added ControlType property as below </span></div><div><span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px"><prop oor:name="ControlType" oor:type="xs:string"> </span></div><div><span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px">      <value>DropdownButton</value> </span></div><div><span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px"></prop></span></div><div><span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px"> which resulted in the button to look like dropdown. But i am confused on how to add sub items in this fashion. </span></div><div>For example LibreOffice uses Save DropdownButton under which we have sub items like Save As, Export etc.<span style="font-family:sans-serif;color:rgb(75,75,75);font-size:14px"><br></span></div><div><br><br></div><div>I didn't get any response from our forum too. Please guide</div><div><a href="https://ask.libreoffice.org/en/question/241346/how-to-add-dropdownbutton-to-toolbar-item-using-xcu-for-extensions/" target="_blank">https://ask.libreoffice.org/en/question/241346/how-to-add-dropdownbutton-to-toolbar-item-using-xcu-for-extensions/</a> </div><div> </div></div></div></div></div></div>