Recent

Author Topic: Hide components in Form-Editor and Object-Inspector  (Read 5286 times)

Schaelle

  • New Member
  • *
  • Posts: 13
Hide components in Form-Editor and Object-Inspector
« on: August 03, 2006, 12:06:42 pm »
Hi,

i have some components that are overlay other components.

That hinder me on edinting, any way to hide the components in the Form-Editor and Object-Inspector?

Greetings,
Schaelle

Frate

  • New Member
  • *
  • Posts: 24
Re: Hide components in Form-Editor and Object-Inspector
« Reply #1 on: November 25, 2021, 01:21:42 pm »
Hi,
I'm sorry for resureccting this ancient topic but I could not find any other mention of this feature.
Any way to hide visual components in form at design-time (v2.0.12)?

Frate

winni

  • Hero Member
  • *****
  • Posts: 2803
Re: Hide components in Form-Editor and Object-Inspector
« Reply #2 on: November 25, 2021, 02:39:22 pm »
Hi!

Use a TPageControl with multiple different pages.

Winni

lainz

  • Hero Member
  • *****
  • Posts: 3874
Re: Hide components in Form-Editor and Object-Inspector
« Reply #3 on: November 25, 2021, 03:06:46 pm »
Use a Datamodule?

wp

  • Hero Member
  • *****
  • Posts: 9025
Re: Hide components in Form-Editor and Object-Inspector
« Reply #4 on: November 25, 2021, 03:35:42 pm »
A Datamodule is for non-visual components only.

Besides a TPageControl you can also use a TNotebook which neither changes the form background color nor leaves a border. But the need to hide components is a good indicator that the form has become too complex. The correct way to handle this is by putting the components on TFrame components which are form-like classes and separate also the event handlers into their own unit. Ideally you insert the frame(s) into the mainform at runtime. The Lazarus IDE is a good example for working with frames. Another, less complex, example is the charteditor demo in folder components/tachart/demo/charteditor of your Lazarus installation.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lainz

  • Hero Member
  • *****
  • Posts: 3874
Re: Hide components in Form-Editor and Object-Inspector
« Reply #5 on: November 25, 2021, 04:16:27 pm »
A Datamodule is for non-visual components only.

Indeed I was thinking on components like TTimer for example, not visual ones.

 

TinyPortal © 2005-2018