Microsoft KB Archive/156227

= ACC95: Image Extends Below Tab of TabStrip Control =

Article ID: 156227

Article Last Modified on 7/1/2002

-

APPLIES TO


 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q156227



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you add an image to a TabStrip Control and then set the TabWidthStyle property of the TabStrip Control to Fixed, the image may extend below the tab.



CAUSE
If the TabWidthStyle property is set to Fixed, or if you change the TabWidthStyle property to Fixed after adding the image, and the TabFixedHeight and TabFixedWidth properties are set to a size smaller than the image, the image will not shrink. Instead it will extend below the tab.



RESOLUTION
Increase the size of the TabFixedHeight and TabFixedWidth properties.



MORE INFORMATION
When you add an image to the TabStrip control, if the TabWidthStyle property is set to Justified (default), it will adjust the size of the tab to fit the image. This behavior occurs only if the TabWidthStyle property is set to Fixed.

Steps to Reproduce Behavior
 Open a new blank form in Design view. On the Insert menu, click Custom Control. In the Insert OLE Custom Controls dialog box, select ImageList Control, and then click OK. On the View menu, click Properties. Set the Name property of the ImageList control to IList.</li> Using the right mouse button (right-click), click the ImageList control, point to ImageList Control Object, and then click Properties.</li> In the ImageList Control Properties dialog box, click the Images tab.</li> Click the Insert Picture button. Select the Rivets.bmp file from the Windows folder, and then click Open.</li> Click OK in the Image List Control Properties dialog box.</li> On the Insert menu, click Custom Control.</li> In the Insert OLE Custom Controls dialog box, select TabStrip Control, and then click OK.</li>  Set the following properties of the TabStrip Control:

<pre class="fixed_text">     Custom Control: Width: 2"        Height: 1" TabFixedWidth: 400 TabWidthStyle: 2 - Fixed TabFixedHeight: 300 </li> Right-click the TabStrip control, point to TabStrip Control Object, and then click Properties.</li> In the TabStrip Control Properties box, click the General tab.</li> Select IList in the ImageList box.</li> Click the Tabs tab.</li> Type 1 in the Image box, and then click OK.</li> On the View menu, click Form and note that the rivets image extends below the bottom of the TabStrip tab.</li> On the View menu, click Form Design.</li> Set the TabFixedHeight property of the TabStrip control to 500.</li> On the View menu, click Form and note that the rivets image fits within the boundaries of the TabStrip tab.</li></ol>

<div class="references_section">