Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

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
0
pivar
Asked:
pivar
  • 2
  • 2
1 Solution
 
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
 
vladikaCommented:
Try it

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

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


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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now