Recent

Author Topic: TEdit won't align alClient inside a TToolBar  (Read 1340 times)

MISV

  • Hero Member
  • *****
  • Posts: 633
TEdit won't align alClient inside a TToolBar
« on: July 19, 2018, 12:24:49 pm »
I have a reproducable test project for this I can make a bug report on.

But is it a bug that a TEdit won't align? I was hoping to have it align alClient inside a TToolBar to take up available space.

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: TEdit won't align alClient inside a TToolBar
« Reply #1 on: July 19, 2018, 01:22:48 pm »
i might be wrong but i think that when i had alignment issues i placed the component in a TPanel.
maybe it would work for you.
Lazarus 2.0.2 64b on Debian LXDE 10

MISV

  • Hero Member
  • *****
  • Posts: 633
Re: TEdit won't align alClient inside a TToolBar
« Reply #2 on: July 19, 2018, 01:37:45 pm »
I have tried that as well.

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: TEdit won't align alClient inside a TToolBar
« Reply #3 on: July 19, 2018, 04:05:52 pm »
TToolBar is mainly designed for TToolButtons, placing there anything else is a hack. It may work but who knows, especially if you want TEdit together with toolbuttons.
I recommend this: use TCoolBar and Bands. One band for TEdit, other band for TToolBar with toolbuttons.

EDIT: I have good experience in Qt, GTk2 and WIne. I didn't notice that this is Cocoa thread. Cocoa seems to be under develepment, my advice is more "general".
« Last Edit: July 19, 2018, 04:09:02 pm by Blaazen »
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/


MISV

  • Hero Member
  • *****
  • Posts: 633
Re: TEdit won't align alClient inside a TToolBar
« Reply #5 on: July 19, 2018, 08:29:08 pm »
Hi Bart,

Thank you for your link. I guess I will find another way. The way I construct the toolbar/controls in Delphi were also directly on a panel outside toolbar, but that solution has its own problems in Cocoa.

But now I know that TEdit inside TToolBar is deprecated, so if nothing else - this simplifies my search for a solution