Microsoft Developer Network > 포럼 홈 > Visual Studio Tools for Office > How do you set the width of the Drop-Down Box on the Ribbon?
질문하기질문하기
 

답변됨How do you set the width of the Drop-Down Box on the Ribbon?

  • 2008년 12월 5일 금요일 오후 2:50Brad Smith, CPA 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
     Hi,

    I'm using Visual Studio 2008 and am designing a Word 2007 add-in.  I added a couple of dropdown controls to the ribbon, but I can't figure out how to set the width of the items box.  It's too narrow for the items in the drop down window (The maximum width of any item is 8 characters).  The two drop down controls are inside a Box.  There's plenty of room on the ribbon to widen these.

    Please advise.

답변

  • 2008년 12월 5일 금요일 오후 3:31Brad Smith, CPA 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    I figure it out.  In the sizestring property I was using a numeric value to represent the number of characters.  Instead, use X's to represent the character width of the box.  For example entering the following for the sizestring  property sets the width to the length of the string when the ribbon is loaded:

    XXXXXXXXXXXXXXXXXXXXXXXXXX

    This is not intuitive.  I hope this helps others that run into this problem.
    • 답변으로 표시됨Brad Smith, CPA 2008년 12월 5일 금요일 오후 3:32
    •  

모든 응답

  • 2008년 12월 5일 금요일 오후 3:25chefgon 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    What kind of drop-down are you using?  I just added a menu with a really long item label inside and the width expanded automatically.
  • 2008년 12월 5일 금요일 오후 3:31Brad Smith, CPA 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    I figure it out.  In the sizestring property I was using a numeric value to represent the number of characters.  Instead, use X's to represent the character width of the box.  For example entering the following for the sizestring  property sets the width to the length of the string when the ribbon is loaded:

    XXXXXXXXXXXXXXXXXXXXXXXXXX

    This is not intuitive.  I hope this helps others that run into this problem.
    • 답변으로 표시됨Brad Smith, CPA 2008년 12월 5일 금요일 오후 3:32
    •  
  • 2008년 12월 5일 금요일 오후 3:33chefgon 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I just figured out what you were talking about, but you've already got it figured out.  I agree it's really bizarre, I'm not sure why they decided to do it that way.