Try using a different event that triggers later than that, like OnClick. DJS
--- "Jamie L. Mitchell" <[EMAIL PROTECTED]> wrote: > Hello All: > > Using Delphi 5 Pro. I have a tree that I use for > selecting certain > sets of controls at different times. For example, 1 > node may > represent a particular type of input set. I select > the node in the > tree, and a panel is made visible, containing the > correct controls. > Select a different node, and a different panel is > made visible > containing different controls. > > The work of bringing up the controls is done in > response to the > "OnChange" event. This all works almost the way I > want. > > The problem is that when a panel is made visible, I > would like to > highlight the text in a particular control and make > it the active > control. As this is being done in the function > called in the > OnChange, the control text selection and activation > is overridden by > the processing done in the tree after the OnChange > event ends. For > example, if I step through in the debugger, the > lines: > > memDescrip.SelectAll; > ActiveControl := memDescrip; > > are executed and I can see the highlighting and > activation of the > memo. However, pressing F9 to continue processing > causes the active > control to revert to the tree. > > While this behavior makes sense, I would like to > change the behavior > so that clicking on a node selects the panel and > causes focus to be > moved from that tree control to the memo in the > panel. I would prefer > not to rewrite the tree control. > > Any ideas? > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h1r940l/M=362335.6886445.7839731.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1123875406/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

