Have a look at the anchors property on the TButton

Cheers,
Charlie

  ----- Original Message ----- 
  From: neomavez 
  To: advanced_delphi@yahoogroups.com 
  Sent: Monday, January 05, 2009 11:50 AM
  Subject: [advanced_delphi] Subcomponent of TWincontrol scroll too...



  I need to make a component that descends from TTreeView. I want to add
  a button as subcomponent.

  constructor TMyTree.Create(AOwner: TComponent);
  begin
  inherited;

  bt := TButton.Create(Self) ;
  bt.Parent := Self ;
  btAll.SetSubComponent(True) ;

  btAll.Height := x ;
  etc, etc etc

  end;

  Everything works perfect, but when TTReeView Scroll, the button Scroll
  too. I would like to remain equidistant from the top edge.
  How should I deal with this problem? The Button Parent should be the
  same Parent of "Self" (i.e. the Form) ?
  I would thank you very much for a little clue to continue. I hope you
  understand my english.

  TIA



   

Reply via email to