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?




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hk9ueuo/M=362329.6886308.7839368.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1123866341/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</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/
 



Reply via email to