ACC95: Image Extends Below Tab of TabStrip Control

ID: Q156227


The information in this article applies to:


SYMPTOMS

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

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


  1. Open a new blank form in Design view.


  2. On the Insert menu, click Custom Control.


  3. In the Insert OLE Custom Controls dialog box, select ImageList Control, and then click OK.


  4. On the View menu, click Properties.


  5. Set the Name property of the ImageList control to IList.


  6. Using the right mouse button (right-click), click the ImageList control, point to ImageList Control Object, and then click Properties.


  7. In the ImageList Control Properties dialog box, click the Images tab.


  8. Click the Insert Picture button. Select the Rivets.bmp file from the Windows folder, and then click Open.


  9. Click OK in the Image List Control Properties dialog box.


  10. On the Insert menu, click Custom Control.


  11. In the Insert OLE Custom Controls dialog box, select TabStrip Control, and then click OK.


  12. Set the following properties of the TabStrip Control:
    
          Custom Control:
             Width: 2"
             Height: 1"
             TabFixedWidth: 400
             TabWidthStyle: 2 - Fixed
             TabFixedHeight: 300 


  13. Right-click the TabStrip control, point to TabStrip Control Object, and then click Properties.


  14. In the TabStrip Control Properties box, click the General tab.


  15. Select IList in the ImageList box.


  16. Click the Tabs tab.


  17. Type 1 in the Image box, and then click OK.


  18. On the View menu, click Form and note that the rivets image extends below the bottom of the TabStrip tab.


  19. On the View menu, click Form Design.


  20. Set the TabFixedHeight property of the TabStrip control to 500.


  21. On the View menu, click Form and note that the rivets image fits within the boundaries of the TabStrip tab.



REFERENCES

For more information about the TabStrip OLE Control, search for "TabStrip Control" using the Microsoft Access for Windows 95 Help Index.

For more information about the ImageList OLE Control, search for "ImageList Control" using the Microsoft Access for Windows 95 Help Index.


Keywords          : kbinterop 
Version           : 7.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 3, 1999