Recent

Author Topic: Can TObjectInspector handle frames and the contents?  (Read 3174 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1147
    • HowTos Considered Harmful?
Can TObjectInspector handle frames and the contents?
« on: February 25, 2016, 09:02:01 am »
I am using the ObjectInspector/ObjecInspectDialog component to locate objects for editing in the PropertyInspector at runtime. It seems that it cannot locate components within Frames, although the one in form designer at design time is capable of doing so.

Is there anyway of working around that limitation?
Lazarus 3.0/FPC 3.2.2

Thaddy

  • Hero Member
  • *****
  • Posts: 16994
  • Ceterum censeo Trump esse delendam
Re: Can TObjectInspector handle frames and the contents?
« Reply #1 on: February 28, 2016, 09:26:14 am »
Well, frames are a design-time only container by concept.
At compile time the parent form becomes the owner of the controls and the frame isn't there anymore...
If you need a reference at runtime you should use separate forms instead of frames.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Can TObjectInspector handle frames and the contents?
« Reply #2 on: March 04, 2016, 04:54:12 pm »
Well, frames are a design-time only container by concept.
At compile time the parent form becomes the owner of the controls and the frame isn't there anymore...
If you need a reference at runtime you should use separate forms instead of frames.
erm no they are full containers, they are designer aware containers ee they can be floating windows while design but they are full blown containers on runtime just like a panel.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 16994
  • Ceterum censeo Trump esse delendam
Re: Can TObjectInspector handle frames and the contents?
« Reply #3 on: March 04, 2016, 06:03:35 pm »
I wrote "by concept". That they behave like that is implementation detail and not guaranteed to be valid.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

balazsszekely

  • Guest
Re: Can TObjectInspector handle frames and the contents?
« Reply #4 on: March 04, 2016, 06:14:53 pm »
@Thaddy
I told you, you're wrong about the frames!  :D

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Can TObjectInspector handle frames and the contents?
« Reply #5 on: March 04, 2016, 06:40:34 pm »
I wrote "by concept". That they behave like that is implementation detail and not guaranteed to be valid.
Who's concept? As far as I understand all controls under the frame are invisible that can't be achieved with "virtual" containers also setting the visible and enabled properties should also set the contained controls properties etc. I would say that frame are implemented to the concept of a container to perfection.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018