Charlie and David, Thanks for answering. I think I do not give a good explanation of the problem. Sorry for my english. I want a descendant of TTreeView that have a button within itself (in its display area). In my first message I said "When TTReeView Scroll, the button Scroll too". Its not exactly true. The button seems to scroll, but if I call Repaint, the button is still there, equidistant from the top edge. How can I make the button does not move from there And it does not "blink"? There is a message that I can capture to repaint Button? Any other idea?
All of this explanation is about the code that I put in my first message: Button.Parent := TreeView Thanks very much --- David Smith <djsmith_1...@...> wrote: > > What happens when you make the buttons parent the Treeview? > > Dave > > --- On Mon, 1/5/09, Charlie Chambers <chambers...@...> wrote: > > From: Charlie Chambers <chambers...@...> > Subject: Re: [advanced_delphi] Subcomponent of > TWincontrol scroll too... > To: advanced_delphi@yahoogroups.com > Date: Monday, January 5, 2009, 10:01 AM > > > > 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.SetSubCompone nt(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 >