Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent treeview's NodeClick() event from firing?
Message
 
To
28/04/2004 03:08:31
F Bilo
Bilo Office
Fuyang, China
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00898850
Message ID:
00898924
Views:
14
Why not flush the buffers at the top of the node click:
procedure NodeClick(node)
IF thisform.check_datachanged()
   thisform.cmdSave.Click()
endif
node.selected=.t.
* ... complete node click processes
endproc
>Hi, all:
>
> I am useing treeview as a Customer List. When user click the treeview, before Navagitor to an new record, i need to check out that if there are some unsaved data in buffer.So, if it is, and user chosed return form my dialog, I have to prevent the treeview's NodeClick() events from happening. I add this in treeview's MouseDown:
>
>Treeview.MouseDown:
>********************************************
>LPARAMETERS button, shift, x, y
>LOCAL loNode as Object
>
>loNode = this.hitTest(x/96*1440, y/96*1440)
>
>IF thisform.check_datachanged()
> NODEFAULT
> RETURN .F.
>ENDIF
>********************************************
>
>And add this in treeview's nodeClick() event:
>
>Treeview.NodeClick()
>********************************************
>LPARAMETERS node
>
>WAIT WINDOW "NodeClick hanppened!"
>********************************************
>
>Unfortunately,I kept see the "NodeClick hanppened!" msg displaying, even though the form's check_datachanged() Return .f..
>
>How to prevent treeview's nodeclick() from happening?
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform