Toolbar Frequently Asked Questions
This article answers some frequently asked questions about the toolbar and shows you
how to work around bugs in the current release of the control.
-
My tooltips are too long and have corrupted characters at the end
This problem is caused by an error in the control. The control fails to add enough terminating
nulls to strings it passes to the tooltip, which can cause the tooltip to overrun.
You can solve this by adding Chr$(0) or vbNullChar to the end of any tooltip
strings you add to the control.
-
I have set the control's ImageList properties, but no icons are showing!
There are two possible causes of this problem:
-
Unlike the ImageSource properties, you can only use the SetImageList method after a call to the CreateToolbar
method. Swap the order of the calls and the control will work.
-
With all vbAccelerator controls, attempting to set an ImageList to a COMCTL32.OCX ImageList which
contains no images will fail. This is because vbAccelerator controls access the underlying API
ImageList, and for some reason COMCTL32.OCX will not actually create the API ImageList until it
has at least one image in it.
To solve this problem, either place a dummy image in the ImageList at design time, or make sure
you have added your images to it before trying to use the SetImageList method.
-
The Background Bitmap for the Rebar control only displays in three colours on my system
This occurs on systems with colour depths of 256 colours or less. The Rebar only supports
background bitmaps as follows:
- 16 colour display - 16 colour bitmap.
- 256 colour display - 16 colour bitmap plus system colours.
- >256 colour displays - any bitmap.
If you are using the vbAccelerator ImageList control you can query
it's SystemColourDepth method to determine whether the target system supports true colour.
If you aren't, snip the code out of the ImageList control and use that.