* * *

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

R0b0t1

  • Full Member
  • ***
  • Posts: 139
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.
« Last Edit: February 10, 2017, 09:48:54 pm by R0b0t1 »

howardpc

  • Hero Member
  • *****
  • Posts: 2400
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 »

R0b0t1

  • Full Member
  • ***
  • Posts: 139
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.
« Last Edit: February 10, 2017, 03:16:52 pm by R0b0t1 »

rvk

  • Hero Member
  • *****
  • Posts: 2945
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.

R0b0t1

  • Full Member
  • ***
  • Posts: 139
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.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus