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
- 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.
- Using the right mouse button (right-click), click the ImageList
control, point to ImageList Control Object, and then click Properties.
- In the ImageList Control Properties dialog box, click the Images tab.
- Click the Insert Picture button. Select the Rivets.bmp file from the
Windows folder, and then click Open.
- Click OK in the Image List Control Properties dialog box.
- On the Insert menu, click Custom Control.
- In the Insert OLE Custom Controls dialog box, select TabStrip Control,
and then click OK.
- Set the following properties of the TabStrip Control:
Custom Control:
Width: 2"
Height: 1"
TabFixedWidth: 400
TabWidthStyle: 2 - Fixed
TabFixedHeight: 300
- Right-click the TabStrip control, point to TabStrip Control Object, and
then click Properties.
- In the TabStrip Control Properties box, click the General tab.
- Select IList in the ImageList box.
- Click the Tabs tab.
- Type 1 in the Image box, and then click OK.
- On the View menu, click Form and note that the rivets image extends
below the bottom of the TabStrip tab.
- On the View menu, click Form Design.
- Set the TabFixedHeight property of the TabStrip control to 500.
- 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
|