Solved

Invisible components in designmode

Posted on 1998-07-10
5
176 Views
Last Modified: 2010-04-04
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
Comment
Question by:pivar
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357589
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
 
LVL 22

Author Comment

by:pivar
ID: 1357590
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
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357591
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
 
LVL 3

Accepted Solution

by:
vladika earned 50 total points
ID: 1357592
Try it

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

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


0
 
LVL 22

Author Comment

by:pivar
ID: 1357593
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question