差异设计和运行时间

时间:2013-04-10 20:42:17

标签: delphi vcl

THIDEpanel开发仍然给我带来许多问题。我按照这里给出的说明Other Help and Questions

我现在设计的内部面板为红色,外部面板稍微小一些。如果我在测试应用程序中运行组件,则仅绘制外部面板,并且放置在内部工作面板上并且在设计时可见的所有组件都不再可见。

我假设错误如下:outedr面板被绘制为最后一个动作,因此在运行时我看不到红色内部面板和组件放在这里? 这是真的,我的假设在哪里错了,我该怎么做才能解决这个问题

我的组件的最新Create函数来自:

constructor THidePanel.create(aOwner: TComponent);
begin
  inherited;

  padding.Left:= BorderSize;
  padding.top:= BorderSize;
  padding.right:= BorderSize;
  padding.Bottom:= BorderSize;



  //  the inner panel
  WorkingPanel := TPanel.create(self);
  WorkingPanel.Caption := ' ';
  WorkingPanel.BevelOuter := bvNone;

  // WorkingPanel.BringToFront;

  WorkingPanel.Color :=220;
  WorkingPanel.ParentColor := false;
  WorkingPanel.Parent := self;
  WorkingPanel.Align := alClient;

  //  the button to mimimize / maximize
  FActivateButton := TButton.create(self);
  FActivateButton.Parent := self;
  FActivateButton.Caption := '<';
  FActivateButton.OnClick := H_ActivateButtonClick;
  FActivateButton.Width := BorderSize;

  FActivateButton.Height := BorderSize;


  ///   the restore values , correct setting
  FLargeWidth := self.Width;
  FLargeHeight := self.Height;
  FHasCustomSize := false;

  // here I draw the activate button on the outer panel
  SetButtonPosition(topright);


  //  drop components only on the inner panel
  ControlStyle := ControlStyle - [csAcceptsControls]

end;

DESIGN AND RUN TIME ISSUES

not vivible components at run time

1 个答案:

答案 0 :(得分:1)

尝试将WorkingPanel.Visible设为True