Solved

Invisible components in designmode

Posted on 1998-07-10
5
169 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now