xml - Change size of Custom Excel Ribbon dropdown -
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
Post a Comment