Solved

VB6: CoolBar Height

Posted on 1998-08-20
3
871 Views
Last Modified: 2008-02-01
I am using Visual Basic 6.0 (not the beta or technology preview).  I have a coolbar control with a toolbar contol in the first band and a text box in the second band.  When I start my application, the height for the first band gets changed to something way out of proportion.  It gets something like 5 times taller than it needs to be.

Has anyone seen this problem or know how to fix it?

Lankford
0
Comment
Question by:lankford
3 Comments
 
LVL 2

Expert Comment

by:chris_a
ID: 1430119
ditto, just peeking at the answers you get
0
 
LVL 2

Accepted Solution

by:
lmorris earned 50 total points
ID: 1430120
I had the same problem and it appears to deal with the Toolbar control. You'll notice that if you place just a toolbar on the form, it's 500+ twips high. The coolbar is just adjusting itself to the height of it's child control (the toolbar).

So, change the height of the toolbar by setting it's buttonheight property to something like 329.9533.

This will reduce the size of your toolbar. When you hit F5, you'll see the coolbar will be the height you expected.

A couple of notes. If you do something to increase the size of the toolbar, the coolbar will automatically resize itself. An unfortunate example is adding text. I really didn't like the fact that MS didn't improve the menu bar, so I was going to use a toolbar, with just text buttons. No picture, just text. The toolbar wouldn't let me adjust the size of the buttons to less than 500 and somthing.

Hope this solves your problem!

0
 

Author Comment

by:lankford
ID: 1430121
The text below comes from the VB 6 documentation concerning the coolbar control:

Some controls may not behave as expected when contained within a CoolBar control. For example, a contained Toolbar control won’t paint properly when its Wrappable property is set to True and the CoolBar is resized. To avoid this problem, set the Wrappable property to False.

I have done as the above note suggests and still notice problems.  For instance, if I change the toolbar at runtime to include text messages on the buttons, the coolbar band will not resize.  I have found no way to force the coolbar into resizing.

If you ask me, this control is buggy and needs work. . .

Lankford

PS - You received good instead of excellent because although you were able to identify the source of my problems as being the toolbar, you were unable to point specifically to the wrappable property.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question