Consulting

Results 1 to 5 of 5

Thread: ibox only showing label for AlignCenter

  1. #1
    VBAX Regular
    Joined
    Jan 2020
    Posts
    13
    Location

    ibox only showing label for AlignCenter

    My custom box is ONLY showing the label for Center and I don't know why, I have tried removing the left and right labels (label="Left"), changing their names, however it only ever shows center and the others have no labels at all


    <box id="box3" boxStyle="vertical">      
          <control idMso="AlignLeft" label="Left" />
          <control idMso="AlignCenter" label="Center" />
          <control idMso="AlignRight"  label="Right" />
    </box>

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,702
    Location
    Hmmm - interesting

    Adding size="large" to the buttons works (sort of) but they look horizontal


    Capture2.JPG


    I'm guessing that using a <box> container with small buttons is handled differently


    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
      <ribbon>
        <tabs>
          <tab idMso="TabHome" >
            <group id="customGroup1" label="Group 1" insertAfterMso="GroupEditingExcel" >
                <box id="box3" boxStyle="vertical">      
                      <control idMso="AlignLeft" size="large"  label="Left" />
                      <control idMso="AlignCenter" size="large" label="Center" />
                      <control idMso="AlignRight"  size="large" label="Right" />
                </box>
           </group>
          </tab>
    
    
        </tabs>
      </ribbon>
    
    
    </customUI>
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Regular
    Joined
    Jan 2020
    Posts
    13
    Location
    Thank Paul,
    I ended up just using small buttons not in a box and it worked, really strange though

  4. #4
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    Set the showLabel property to True

    					<box 
    						boxStyle="vertical"
    						id="Box1">
    						<toggleButton 
    							idMso="AlignLeft"
    							label="Left"
    							showLabel="true"/>
    						<toggleButton 
    							idMso="AlignCenter"
    							label="Center"/>
    						<toggleButton 
    							idMso="AlignRight"
    							label="Right"
    							showLabel="true"/>
    					</box >
    Cheers
    Andy

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,702
    Location
    Quote Originally Posted by Andy Pope View Post
    Set the showLabel property to True
    That's interesting -- thanks

    I knew about 'showLable' but since the default = "true" I never bothered to try it

    That'll teach me to assume anything
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •