Solved

VB6: CoolBar Height

Posted on 1998-08-20
3
830 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
Comment Utility
ditto, just peeking at the answers you get
0
 
LVL 2

Accepted Solution

by:
lmorris earned 50 total points
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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

15 Experts available now in Live!

Get 1:1 Help Now