Solved

VB6: CoolBar Height

Posted on 1998-08-20
3
884 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 81
How to make an ADE file by code? 11 111
Passing a Text Box name to a Sub 6 104
Formula problem with Excel attachment 6 45
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

710 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