Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TToolbar component

Posted on 1997-09-18
4
Medium Priority
?
411 Views
Last Modified: 2011-09-20
     Is it possible to place buttons on the TToolbar component and have them keep the location they were placed in? Every time I drop a speedbutton on it it aligns the controls on the left.
0
Comment
Question by:khenr29j
[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
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1345495
I would say it's not possible because of TToolbar's call to RepositionButtons, which gets called by AdjustControl, which in turn gets called by AlignControls, which really messes things up.

AlignControls can be overriden, but unfortunately RepositionButtons is not virtual (thus cannot be overriden).

In addition, the call "Perform(TB_AUTOSIZE, 0, 0);" resides in ResizeButtons, which is declared privately & thus also cannot be overriden...

0
 

Author Comment

by:khenr29j
ID: 1345496
I have access to the source code, so yanking the offending code is not a problem. What lines do I need to comment out to make it work the way I want it to?
0
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 100 total points
ID: 1345497
I presume that you mean to create a new control by copying the code from TToolbar, creating a new control (e.g. TMyToolbar) which is NOT inherited from TToolbar (i.e. a copy of TToolbar), and deleting code which you don't need.  

The TToolButton makes many calls to TToolbar (e.g. FToolBar.RepositionButtons(0);) so if you want to start yanking code out of TToolbar, you'll also have to yank code out of TToolButton.  I.e. you'll also need a TMyToolButton.

This is a completely separate issue from your original question:
"Is it possible to place buttons on the TToolbar component..." and is certainly not worth the hassle for 50 pts.

0
 

Author Comment

by:khenr29j
ID: 1345498
I found a component named TSpeedbar that does what I wanted, available from http://rx.unionjv.ru/rxengl.htm
I also don't use the TToolButton but instead the TSpeedButton.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

718 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