6

I have a series of visual compound components that I'm building, which use similar / common "connect" methods, which fire up there internal tables, etc.

I am automating some of the connection stuff to connect automatically at runtime. How do I tell, at the component level, if the current state is runtime or designtime?

Jamo
  • 3,238
  • 6
  • 40
  • 66

1 Answers1

17

I think you want to check if the csDesigning flag is present in the component's ComponentState property:

if csDesigning in ComponentState then
  // designtime
else
  // not designtime
onnodb
  • 5,241
  • 1
  • 32
  • 41
Herbert Sitz
  • 21,858
  • 9
  • 50
  • 54