none
Excel Custom Ribbon UI Japanese text wrapping RRS feed

  • Question

  • I have a custom ribbon in an Excel application. I have translated it to Japanese for a customer and they are reporting that the text does not wrap correctly. I simply have the XML as label="分割". But when the ribbon paints it wraps the two characters onto separate lines. There is no space between the two characters so I do not understand why this happens. My Japanese customer explains that the characters on separate lines does not mean the same thing. But the Ribbon UI API does not seem to provide me with any control over the wrapping. How should this be done? See screenshot of how it paints:

    Thursday, January 28, 2016 9:51 AM

All replies

  • Hi Shaun,

    >> But the Ribbon UI API does not seem to provide me with any control over the wrapping.

    Do you mean you test label=”分割” under Japanese Excel version or English Excel version? I made a test with Excel with English version and label “分割”, and I could reproduce your issue. Also, I made a test with Japanese Excel with label "セグメンテーション", and I could reproduce your issue. As my test, if you set ControlSize as RibbonControlSizeRegular, it would not warp text. So I suggest try RibbonControlSizeRegular.

    For another workaround, I suggest you use an image with label and set text of label with space.

    For this issue, I suggest you submit a feedback in the link below:
    Reference: https://excel.uservoice.com/

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, January 29, 2016 3:11 AM
  • Hi

    Please can you confirm where in the Ribbon XML you specify "ControlSize as RibbonControlSizeRegular" as I cannot find any documentation on this. Please can you provide an example of the XML where you indicate "As my test, if you set ControlSize as RibbonControlSizeRegular, it would not warp text."

    Thanks

    Friday, February 5, 2016 12:08 PM
  • Hi Shaun,

    I set it in Ribbon XML designer, for xml. I suggest you remove "size='large'" from xml.

    Here is a simple demo.

    <button id="btnFunction1" image='image='image path'  onAction='OnFunctionButtonPressed'   getLabel='GetLabel'  screentip='My button tooltip' supertip='Desription my button - supertooltil ' />

    But in this way, the image and charters would keep in the same line.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, February 9, 2016 2:27 AM
  • Thanks I will test this as soon as possible. But just to confirm are you saying that in order to set ControlSize as RibbonControlSizeRegular you actually remove the size='large' for a specific button?

    That is quite confusing. I was expecting there to be another property that needed to be set in order to control sizing and scaling rather than actually leaving out the button sizing property.

    Tuesday, February 9, 2016 5:51 AM
  • Ok I have done a test now with this XML

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> 
     <ribbon startFromScratch="false">
      <tabs>
       <tab id="customTab" label="Custom Tab">
        <group id="customGroup" label="Custom Group">
         <button id="customButton" label="分割" image="myImage" onAction="Callback" />
        </group>
       </tab>
      </tabs>
     </ribbon>
    </customUI>

    However, as you point out this now paints as follows in one line using a small icon despite the fact that my icon is 32 X 32.

    This is not what I want. The icons in my application are sometime large 32 X 32 and sometimes small 16 X 16. I do not want the Japanese version to have a different sizing of the icons as that will not look good and will be very difficult to maintain.

    Please can you let me know the solution to retain a 32 X 32 icon painted at its full size and still have Japanese text not wrap incorrectly.

    Thanks


    Tuesday, February 9, 2016 8:00 AM
  • Hi Shaun,

    For this issue, to be honesty, I have no better way. I suggest you submit a feedback in the link of my first reply.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Tuesday, February 9, 2016 8:35 AM
  • Thank you for your suggestion however I do not want to request a new Excel feature. I fully believe that there must be a solution for this in the current Excel versions. Surely Microsoft would not have created an extensible Ribbon framework that does not properly support other languages.

    If you have any other way that I can get a definitive answer on this issue from Microsoft I would really appreciate that.

    Regards

    Shaun

    Tuesday, February 9, 2016 8:52 AM
  • Try add \n to the end. like: 

    tiButton.Label ="分割\n";

    Friday, January 19, 2018 8:32 AM
  • It works for me. The label text places in one line now. Thanks a lot.
    Tuesday, October 29, 2019 8:31 AM