Invisible components in designmode

Hi,

How can I hide a component in designmode? More specifically, I'm creating my own component which sometimes will be set to visible := False. Even though the component is invisible when running, in design mode it's visible.

Thanks,
pivar
LVL 22
pivarAsked:
Who is Participating?
 
vladikaConnect With a Mentor Commented:
Try it

Override constructor and
set ControlStyle := ControlStyle + [csNoDesignVisible]

From help:
csNoDesignVisible      The control is not visible at design time.


0
 
ZifNabCommented:
Euhm, why do you want to do that? When it's invisible in design-mode how will you ever find it back easely? Zif.
0
 
pivarAuthor Commented:
Well, actually it's a component (e.g. TEdit) in my component which should be invisible (I was to lazy to write that). I'm changing the look of the component with properties (show this or show that). It would be nice if it looked the same in runtime and designmode.

/pivar
0
 
ZifNabCommented:
Hi pivar, yes it would be nice, but not very friendly for the designer. He wont find his component easely back if it's invisible.
Zif.
0
 
pivarAuthor Commented:
Vladika, thanks. It was exactly what I looked for.

ZifNab, I understand your concerns but it's a component created in my component that's going to be invisible. My component will never be hided from the designer, it's just that the looks will be different according to some properties.

/pivar
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.