네 그렇군요. 중요한 사실을 알았네요 감사합니다..꾸벅^^;
네 특별한 이유가 있습니다.
FMmast_comp := TFMmast_comp.Create(self);
FMmast_comp.Caption:= 'AAA';
FMmast_comp.Show;
위 처럼 .
화면이 보여지기 전헤 FMmast_comp.Caption 값을 주어
Activate 될때 FMmast_comp.Caption 값에 따라 화면을 다르게 보이기 위함이죠.
FMmast_comp.Show 호출때만 Activate되게 할수 있는 방법이 있을까요?
civilian,안영제 님이 쓰신 글 :
: MDI Child 폼의 경우엔 Visible이 기본으로 True로 설정됩니다.
: 따라서 폼을 Create하면 Show를 호출하지 않아도 폼이 보이게 됩니다.
: 따로 Show를 해야하는 특별한 이유가 있나요?
:
: 델짱 님이 쓰신 글 :
: : 안녕하세요^^;
: : MDI 부모폼에서 버튼 클릭 이벤트에 다음과 같이 코딩했슴다
: : =============================================================
: : for cMDIchildFind := 0 to (MDIChildCount-1) do
: : if MDIChildren[cMDIchildFind] is TFMmast_comp then begin
: : FMmast_comp.Show;
: : exit;
: : end;
: :
: : FMmast_comp := TFMmast_comp.Create(self);
: : FMmast_comp.Show;
: : =============================================================
: :
: : FMmast_comp 는 MDI 자식인데 create / Activate 이벤트을 사용합니다
: : 그른데 트레이스로 추적해보니
: : FMmast_comp := TFMmast_comp.Create(self); 문을 지날때
: : create / Activate 문이 같이 수행되네요 ?
: :
: :
: : FMmast_comp.Show 호출시에 비로소 Activate 문이 실행 마땅 할텐데..
: : 어떻게 방법이 있을까요?
: :
: : 그럼 수고 하세요.
|