Recent

Author Topic: [SOLVED] Compoonent visible in object inspector but no longer visible on form.  (Read 5017 times)

guest60499

  • Guest
How do I restore the component? It isn't visible but is still in the object inspector.

Admittedly I feel extremely stupid. All of my searches turn up results where the user has accidentally closed an IDE window. Better term recommendations welcome.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Compoonent visible in object inspector but no longer visible on form.
« Reply #1 on: February 09, 2017, 11:33:45 pm »
TControl.Show;
  or
TControl.Visible:=True;

Sometimes Top/Left/Right/Bottom can get values (perhaps negative or too greatly positive) that place the control outside the visible area of their parenting form. So it is worth doing a sanity check on those values. This is generally not a problem, but if you have a multi-monitor setup it is easy to inadvertently give a control bounds that make it invisible when the form is reopened later on a different machine such as a laptop.
« Last Edit: February 09, 2017, 11:59:27 pm by howardpc »

guest60499

  • Guest
Re: Compoonent visible in object inspector but no longer visible on form.
« Reply #2 on: February 10, 2017, 03:13:17 pm »
TControl.Show;
  or
TControl.Visible:=True;

Sometimes Top/Left/Right/Bottom can get values (perhaps negative or too greatly positive) that place the control outside the visible area of their parenting form. So it is worth doing a sanity check on those values. This is generally not a problem, but if you have a multi-monitor setup it is easy to inadvertently give a control bounds that make it invisible when the form is reopened later on a different machine such as a laptop.

That's one of the things I checked before making a post. TVirtualStringTree.Visible is set to true. I can't remember what I did to hide it unfortunately. I've been on the same computer this whole time.

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Compoonent visible in object inspector but no longer visible on form.
« Reply #3 on: February 10, 2017, 03:33:49 pm »
You might have hidden it behind a panel or something.

You could try the following:
  • Click the TVirtualStringTree in the object insprector
  • Richt click on TVirtualStringTree
  • Choose Z-Order and then "Move to Front"
Is your TVirtualStringTree now visible. If so, you need to rearange some things or make sure TVirtualStringTree is a subcomponent of the panel under which it was hidden.

If it is still not visible you could check the Left and Top values in the object inspector for that TVirtualStringTree. Set them to 0 and try above again.

guest60499

  • Guest
Re: Compoonent visible in object inspector but no longer visible on form.
« Reply #4 on: February 10, 2017, 09:48:41 pm »
You might have hidden it behind a panel or something.

You could try the following:
  • Click the TVirtualStringTree in the object insprector
  • Richt click on TVirtualStringTree
  • Choose Z-Order and then "Move to Front"
Is your TVirtualStringTree now visible. If so, you need to rearange some things or make sure TVirtualStringTree is a subcomponent of the panel under which it was hidden.

If it is still not visible you could check the Left and Top values in the object inspector for that TVirtualStringTree. Set them to 0 and try above again.

Thanks. It had somehow wound up at y = -208, which would explain why I couldn't see it. I think when I first glanced over the component's properties my brain removed the negative sign.

 

TinyPortal © 2005-2018