Recent

Author Topic: Can't find TToolButton at design time  (Read 1230 times)

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Can't find TToolButton at design time
« on: November 24, 2025, 07:36:42 pm »
Hi!
I've been tasked with refactoring an old 5,000-lines GUI program to restructure it to make it easier to modify and to support. Part of this challenge is to replace as much as possible of the run-time component creation and the initial properties with the same thing at design-time. So much for the old adage "If it ain't broke, don't fix it!" >:(
There is no TToolButton component appearing in the Common Controls tab nor in any other part of the Components window (Ctrl+Alt+P), although TToolBar and TCoolBar are there.
I'm using Lazarus 2.2.6 under Windows 10. and can't upgrade to later versions.
Any help, solutions or suggestions would be much appreciated!

Thausand

  • Sr. Member
  • ****
  • Posts: 458
Re: Can't find TToolButton at design time
« Reply #1 on: November 24, 2025, 07:47:52 pm »
https://wiki.freepascal.org/TToolButton
Quote
TToolButton is a component that is used within TToolBar.
unit comctrls if want do manual create: https://lazarus-ccr.sourceforge.io/docs/lcl/comctrls/ttoolbutton.html
« Last Edit: November 24, 2025, 07:49:54 pm by Thausand »

cdbc

  • Hero Member
  • *****
  • Posts: 2600
    • http://www.cdbc.dk
Re: Can't find TToolButton at design time
« Reply #2 on: November 24, 2025, 08:18:46 pm »
Hi
Try right-clicking on the TToolBar and look at the menu it produces...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Re: Can't find TToolButton at design time
« Reply #3 on: November 26, 2025, 06:12:47 pm »
Thanks, Thausand & Benny, but what about accessing / setting other properties such as bevel, colour, etc.?
In short, is there a full list of available properties somewhere or example code which shows their use that I could look at?
Thanks, again!
Steve

wp

  • Hero Member
  • *****
  • Posts: 13350
Re: Can't find TToolButton at design time
« Reply #4 on: November 26, 2025, 06:33:37 pm »
Click on the word "TToolButton" in your source code, then press F1 (or CTRL+F1, depending in keymapping) to open the help file (or open it from here: https://lazarus-ccr.sourceforge.io/docs/lcl/comctrls/ttoolbutton.html).

Or CTRL+click on the word "TToolButton" in your source code - this opens the unit in which TToolButton is implemented. Here you find the ultimate documentation in the sources

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4672
  • I like bugs.
Re: Can't find TToolButton at design time
« Reply #5 on: November 26, 2025, 08:38:32 pm »
I'm using Lazarus 2.2.6 under Windows 10. and can't upgrade to later versions.
I am curious why?
Lazarus is free and open source. It has many nice improvements since version 2.2.6.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 650
Re: Can't find TToolButton at design time
« Reply #6 on: November 26, 2025, 10:45:20 pm »
I'm using Lazarus 2.2.6 under Windows 10. and can't upgrade to later versions.
I am curious why?
Lazarus is free and open source. It has many nice improvements since version 2.2.6.

As a Lazarus user I can only underline what Juha said, maybe with a bit more drastic words: with 2.x i'd had a couple of severe issues (reported here & bugtracker), with 3.x it got much more better and with 4.x it works perfectly imo for Windows desktop apps.
With *none* versions upfrom 1.8.x i've had any problems at all to upgrade on Windows 10 (remark: using the 64bit version). (**)
Why one should stay at 2.2.6? ..... So: which uprade issue does exist?

(**) Following the strategy:
- Rename your old Laz. install dir  (eg. to  <install_base>\Lazarus_2.2.6.  So you can easily restore later if needed
- Recreate an empty Laz. install dir, eg. <install_base>\Lazarus
- Backup your old config (eg. in C:\Users\<username>\AppData\Local), subdirs 'Lazarus' and 'FreePascal'. So you can restore it later if needed
- Install into the empty Lazarus folder and let the installation upgrade your config ....
Such really does not work?
Maybe it's rather an issue with a specifc component or package?
« Last Edit: November 26, 2025, 11:03:29 pm by d7_2_laz »
Lazarus 4.4  FPC 3.2.2 Win10 64bit

Zvoni

  • Hero Member
  • *****
  • Posts: 3242
Re: Can't find TToolButton at design time
« Reply #7 on: November 27, 2025, 09:15:37 am »
I'm using Lazarus 2.2.6 under Windows 10. and can't upgrade to later versions.
I am curious why?
Lazarus is free and open source. It has many nice improvements since version 2.2.6.
Shot in the Dark: Company-Computer with Restrictions (e.g. No installations/Update rights)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Re: Can't find TToolButton at design time
« Reply #8 on: November 27, 2025, 05:33:33 pm »
Thanks, WP!

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Re: Can't find TToolButton at design time
« Reply #9 on: November 27, 2025, 05:43:58 pm »
Thanks, Juha Manninen, d7_2_laz, Zvoni!
Can't upgrade the old Dell server (a Xeon 5500-based computer) to Win 11 because it's too old to have the security chip in it which Win 11 requires and, anyway, it's the client's computer, so I don't have the authority.
Regarding a potential Lazarus upgrade, I'm told that they did upgrade in the past, but too many production progs failed, so they had to revert back. I don't have any more details and I don't want to ask :-)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 650
Re: Can't find TToolButton at design time
« Reply #10 on: November 27, 2025, 09:38:29 pm »
Can't upgrade.... to Win 11 because it's too old to have the security chip in it which Win 11 requires

Same here. I ordered a self-configured silent PC at 2015 that is, now, in the same way silent, fast and powerful like in the first days.
From the POV of MS it's now ...... trash. Not upgradable to Win11 due to missing TPM module etc. And no more security updates for Win10 next year. Programmatical obsolescence ...

Regarding a potential Lazarus upgrade, I'm told that they did upgrade in the past, but too many production progs failed, so they had to revert back. I don't have any more details and I don't want to ask :-)

Understood. But, so "it's rather an issue with a specifc component or package" or specifc syntax behaviour ....
Sad not knowing more which ones ....
« Last Edit: November 27, 2025, 09:50:04 pm by d7_2_laz »
Lazarus 4.4  FPC 3.2.2 Win10 64bit

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Re: Can't find TToolButton at design time
« Reply #11 on: November 28, 2025, 06:41:49 pm »
Hi d7_2_laz!
Quote
Understood. But, so "it's rather an issue with a specifc component or package" or specifc syntax behaviour ....
Sad not knowing more which ones ....
Sorry - I don't want to press the point with the client so won't be asking - I'm already seen too much as a 'modernist'. Some of the progs which I have to maintain (Delphi) are literally from the last century (and are still working well)!!! This one is, of course, Lazarus.

mtrsoft

  • Jr. Member
  • **
  • Posts: 63
Re: Can't find TToolButton at design time
« Reply #12 on: November 29, 2025, 06:56:07 am »
@AgriMensor and others,

To install Win 11 on old hardware checkout "Rufus". -- Internet search.

Rufus creates a modified installer that skips the hardware checks that the standard Win 11 installer makes.

I've only used it with the desktop version of Win11.

AgriMensor

  • Jr. Member
  • **
  • Posts: 57
Re: Can't find TToolButton at design time
« Reply #13 on: December 05, 2025, 08:32:40 pm »
Thanks for the tip, mtrsoft! I may try this on one of my own computers at home, but wouldn't be able to on the Xeon that I mentioned.

 

TinyPortal © 2005-2018