>Hi!
>
>ActiveX controls work quite differently than VFP objects, so that behavior is dictated by the implementation of the Tree View control. The workaround here is to use a timer to refresh tree view control properly. After message box enable timer control. In the Timer event of the timer control pout code to change the checked/unchecked status of the node in tree, and than disable timer. Fire it as soon as code finished (10 milliseconds is fine).
>
>
>>Hi,
>>
>>I have a treeview with checkboxes. There are situations where the user CAN'T uncheck a node. When he unchecks a node, a decide if he can do it in the nodecheck event. If the node must remain checked, i check the node (wich the user unchecked) and display a messagebox. The problem is that when the messagebox closes, the check mark (that I've placed in nodecheck event) dissapears, and the node seems unchecked. Is this the type of situation like "You can't call the release method from the init method when running a form! It won't work!!" . How can i do this??
>>
>>TIA
>>
>>Alonso
Vlad,
After a NodeCheck 10 x 0 Alonso match, I made it work. :) I followed your suggestion but it wasn´t working, then i discovered that the node had to be "rechecked" after the NodeCheck event code had finished executing. Since i was using a messagebox, the timer event was finishing before the NodeCheck event. So I changed the messagebox to a wait window.
here´s the working code
LPARAMETERS node
IF (node.CHECKED == .F.)
ThisForm.Node = node
WAIT "You can´t do that!!." WINDOW TIMEOUT 4 NOWAIT
ENDIF
Thanks for helping me one more time!
Alonso
Like Frank said: "I did it... MY WAY!"