xml - Change size of Custom Excel Ribbon dropdown -


enter image description here

i have dropdown in ribbon containing visible sheets in workbook. users can select sheet in there jump it. it's important because there ton of sheets in workbook. unfortunately when name of sheet long, doesn't show completely. i'd make wider.

i used customui editor microsoft office create using not-very-fluent xml skills. here part of code:

<customui xmlns="http://schemas.microsoft.com/office/2006/01/customui" onload="inits3ribbon">     <ribbon>         <tabs>             <tab id="s3tab" label="s3 menu">                 <group id="grgeneral" label="general">                      <dropdown id="navigation" label="navigation" getitemcount="getnavigateitemcount" getitemlabel="getnavigatelabel" onaction="menunavigate" getselecteditemindex="setnavigateindex" showlabel="true" />                      <button id="bshowhidesheet" imagemso="pivotplusminusbuttonsshowhide" label="show/hide sheets" size="normal" onaction="menushowhidesheets" />                     <button id="bpreviouspage" imagemso="leftarrow2" label="previous sheet" size="large" onaction="menuprevioussheet" />                     <button id="bnextpage" imagemso="rightarrow2" label="next sheet" size="large" onaction="menunextsheet" />                 </group> 

i found this resource saying can changed sizestring property i'm not sure how or include in code. looks me it's supposed in vba section? i'm not sure understand , i'd guidance. i'm not sure whether edit xml or vba right , how.

the official xml spec can found here: https://msdn.microsoft.com/en-us/library/cc313070(v=office.12).aspx

it looks sizestring can used directly attribute dropdown xml tag. like:

<dropdown id="navigation" label="navigation" sizestring="my_max_length_string" getitemcount="getnavigateitemcount" getitemlabel="getnavigatelabel" onaction="menunavigate" getselecteditemindex="setnavigateindex" showlabel="true" /> 

you'll have know longest string you'll encounter be, put in my_max_length_string. considering you're using dropdown hold sheetnames, capped @ 31 characters, use length starting point.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -