Recent

Author Topic: [SOLVED] Feature request: Default hide/show nonvisual components  (Read 1087 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
I was wondering if this feature can be added to the IDE options: hide/show nonvisual components.
(under setting: IDE options - Envronment - Miscellaneous)

There is already the option "Show captions of nonvisual components", so maybe the proper place to have to add the option to hide nonvisual components by default. I always hide the nonvisual components, but I always have to right click the form to hide them with new projects, and after loading a project (this option does not seem to be saved in the project).

Please correct me if this already exists.
« Last Edit: November 12, 2025, 12:15:29 pm by Hansaplast »

n7800

  • Hero Member
  • *****
  • Posts: 616
  • Lazarus IDE contributor
    • GitLab profile
Re: Feature request: Default hide/show nonvisual components
« Reply #1 on: October 21, 2025, 05:35:01 pm »
Yes, I noticed this a long time ago too and wanted to write a patch, but I kept putting it off until I forgot ))

Of course, this option should be added to the "Environment > Form Editor" category along with the other Designer options.

I don't know if you mentioned project options by accident, but I think it should be implemented only at the IDE level.

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
Re: Feature request: Default hide/show nonvisual components
« Reply #2 on: October 21, 2025, 07:33:25 pm »
I totally agree 😊
Haha, like we both said, under setting: IDE options - Environment - Miscellaneous.

Either I wrote it a little clumsy or you misread 😉

Anywho ... Would be great to have that option though!

n7800

  • Hero Member
  • *****
  • Posts: 616
  • Lazarus IDE contributor
    • GitLab profile
Re: Feature request: Default hide/show nonvisual components
« Reply #3 on: November 11, 2025, 09:41:28 am »
I've finished the patch and created a merge request. Let's see what the developers have to say...

n7800

  • Hero Member
  • *****
  • Posts: 616
  • Lazarus IDE contributor
    • GitLab profile
Re: Feature request: Default hide/show nonvisual components
« Reply #4 on: November 11, 2025, 09:42:42 am »
There's a small nuance. The option is now available in the Designer context menu and in the IDE Options dialog. What are the interaction variants?

1. Only the setting in the options dialog is remembered. This is the default state for each new Designer. You can change its state separately via the context menu, and it won't be remembered. This is quite flexible.

2. Changes in the context menu are also remembered. This is much more obvious and familiar to the user, and theoretically, the checkbox in the options might not even be necessary. On the other hand, there can be multiple Designers - switching the state in one won't change the others. This means there can be multiple states, but only the most recent switch is remembered.

3. As in the second case, but switching in any Designer will change all the others. This consistent but it's lacks flexibility.

Personally I don't have a preference. So far, only the first option is technically implemented.

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
Re: Feature request: Default hide/show nonvisual components
« Reply #5 on: November 11, 2025, 10:00:51 am »
Very cool! 👍🏻

Option 1 Sounds like the way to go - only remembering the setting in the IDE Options is good enough for me.

Changing it in the Designer view is (probably) often just a temporary change - like when one wants to take a quick look at the non-visual controls.
I typically hide the non visuals right away and only make them visible when needed, but I can imagine others working the other way around (as it is the way it works right now).

2 and 3 are maybe nice to have, but most certainly not needed on my end.
Just my opinion - I'd be super happy with option 1 (as you already implemented) 😊


Excited to go test this! Thank you! And congrats on the 200th merge request! 😊
« Last Edit: November 11, 2025, 10:04:04 am by Hansaplast »

n7800

  • Hero Member
  • *****
  • Posts: 616
  • Lazarus IDE contributor
    • GitLab profile
Re: Feature request: Default hide/show nonvisual components
« Reply #6 on: November 12, 2025, 12:25:33 am »
Thanks, MR has been merged and will be in Lazarus 5.0.

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
Re: Feature request: Default hide/show nonvisual components
« Reply #7 on: November 12, 2025, 12:15:11 pm »
Trunk is at 4.99 right now, right? (just seeing how patient I need to be 😉)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4680
  • I like bugs.
Re: Feature request: Default hide/show nonvisual components
« Reply #8 on: November 12, 2025, 01:52:48 pm »
Trunk is at 4.99 right now, right? (just seeing how patient I need to be 😉)
You can use Lazarus trunk already. It is stable and usable most of the time. I recommend it for hobby projects. Only if you maintain some critical client app then you should stick with a released Lazarus version.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

n7800

  • Hero Member
  • *****
  • Posts: 616
  • Lazarus IDE contributor
    • GitLab profile
Re: Feature request: Default hide/show nonvisual components
« Reply #9 on: November 12, 2025, 03:50:56 pm »
If you decide to give it a try, use FpcUpDeluxe to install it (I haven't personally used it) or just do it via Git:

Code: Bash  [Select][+][-]
  1. git clone https://gitlab.com/freepascal.org/lazarus/lazarus c:\laz
  2. cd /d c:\laz
  3. echo --pcp=config > lazarus.cfg
  4. make clean bigide
  5. lazarus

The command in line 3 is needed to create an isolated configuration file (recommended). All settings for this installation will be stored in the "config" subfolder.

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
Re: [SOLVED] Feature request: Default hide/show nonvisual components
« Reply #10 on: November 12, 2025, 06:59:18 pm »
I use trunk all the time (through FpcUpDeluxe) 😊
Will give it a try!   

Hansaplast

  • Hero Member
  • *****
  • Posts: 765
  • Tweaking4All.com
    • Tweaking4All
Re: [SOLVED] Feature request: Default hide/show nonvisual components
« Reply #11 on: November 13, 2025, 10:31:19 am »
Works as advertised! Nice!


Thanks again n7800, really appreciate it 😊

 

TinyPortal © 2005-2018