Recent

Author Topic: TSplitter and 'Align: alClient' problem  (Read 411 times)

Aruna

  • Full Member
  • ***
  • Posts: 119
TSplitter and 'Align: alClient' problem
« on: December 02, 2022, 03:26:38 am »
Hello, I have a TListbox aligned to alLeft and a Tsplitter with a Tmemo aligned to alClient and two TLabel's at the very top right to provide a visual cue for the end user. The first screenshot demonstrates this without the TMemo being Aligned as alClient and set to alNone. You can see the two TLables.

Now comes my issue. Immediately I set the TMemo to align as alClient I am no longer able to see the two TLabels, please see the second screenshot. Things work, the splitter does what I want it to but I am no longer able to see my two TLabels. How do I resolve this, please? I tried Z-Order no joy..
« Last Edit: December 02, 2022, 03:49:40 am by Aruna »

dsiders

  • Hero Member
  • *****
  • Posts: 1080
Re: TSplitter and 'Align: alClient' problem
« Reply #1 on: December 02, 2022, 04:15:28 am »
Hello,i I have a TListbox aligned to alLeft and a Tsplitter with a Tmemo aligned to alClient and two TLabel's at the very top right to provide a visual cue for the end user. The first screenshot demonstrates this without the TMemo being Aligned as alClient and set to alNone. You can see the two Tables.

Now comes my issue. Immediately I set the TMemo to align as al Client I see the second screenshot. Things work the splitter does what I want it to but I am no longer able to see my two TLabels. How do I resolve this, please? I tried Z-Order no joy..

You can use a TPanel as a container for the Labels and the Memo. Align the Panel to alClient. Align the Labels to the top of the panel, with border spacing as desired. Then align the Memo to  alClient on the panel.

See attached.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Aruna

  • Full Member
  • ***
  • Posts: 119
Re: TSplitter and 'Align: alClient' problem
« Reply #2 on: December 02, 2022, 04:44:12 am »
Hello,i I have a TListbox aligned to alLeft and a Tsplitter with a Tmemo aligned to alClient and two TLabel's at the very top right to provide a visual cue for the end user. The first screenshot demonstrates this without the TMemo being Aligned as alClient and set to alNone. You can see the two Tables.

Now comes my issue. Immediately I set the TMemo to align as al Client I see the second screenshot. Things work the splitter does what I want it to but I am no longer able to see my two TLabels. How do I resolve this, please? I tried Z-Order no joy..

You can use a TPanel as a container for the Labels and the Memo. Align the Panel to alClient. Align the Labels to the top of the panel, with border spacing as desired. Then align the Memo to  alClient on the panel.

See attached.
Wow, this is perfect. Thank you and I just realized we can change the label background color and border spacing.  :)

 

TinyPortal © 2005-2018