0
votes

THidepanel development is still putting many questions to me . I followed the instructions given here Other Help and Questions

I designed the inner panel now to have a red color and be a bit smaller as the outer panel. If I run the component in a test application only the outer panel is drawn and all components placed on the inner working panel and beeing visible at design time are no longer visible.

I assume the bug to be the following : the outedr panel is drawn as a last action and therefore at runtime I can not see the red inner panel and the components placed here? Is this true, where is my assumption wrong, what should I do to fix this problem

The latest Create function for my component comes here :

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
What is the question. And please format your code in a more standard way. All that white space is annoying. Use the format source option in the IDE, for example.David Heffernan
Franz, please note the difference between boarder and border. The latter refers to the edge of something, whereas the former refers to someone who pays you to sleep in your house and eat your food.Rob Kennedy
Franz, I must apologize for my proposed approach, the .dfm will not be able to store the components placed on the working panel, so the second suggestion may be the needed implementation.bummi

1 Answers

1
votes

Try setting WorkingPanel.Visible to True.