0

THidepanel 的开发仍然给我提出了很多问题。我按照此处给出的说明进行操作其他帮助和问题

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

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

我的组件的最新创建功能在这里:

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;

设计和运行时问题

在运行时不可用的组件

4

1 回答 1

1

尝试设置WorkingPanel.VisibleTrue.

于 2013-04-10T21:42:29.213 回答