Solved

VB6: CoolBar Height

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

912 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

23 Experts available now in Live!

Get 1:1 Help Now