Solved

VB6: CoolBar Height

Posted on 1998-08-20
3
859 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now