TreeView4GL

sugindi

New Member
Deal All,

How to close a procedure ( window or dialog ) using mouse double click to a node of a treeview ( TreeView4GL ). The treeview is placed in the procedure ( window/dialog ). I get error like below :
'Le controle "n ' a pas de fenetre parente'.

Regards,


Sugindi
 
sugindi said:
Deal All,

How to close a procedure ( window or dialog ) using mouse double click to a node of a treeview ( TreeView4GL ). The treeview is placed in the procedure ( window/dialog ). I get error like below :
'Le controle "n ' a pas de fenetre parente'.

Regards,


Sugindi

if your treeview is located in UIB window you can place
Code:
APPLY "WINDOW-CLOSE" TO CURRENT-WINDOW.
in NodeClick procedure.
 
That's my workaround for the same problem:

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CtrlFrame C-Win OCX.OnDblClick
PROCEDURE CtrlFrame.TreeView4GL.OnDblClick :
/*------------------------------------------------------------------------------
Purpose:
Parameters: None required for OCX.
Notes:
------------------------------------------------------------------------------*/
....
APPLY "choose":U TO BtnDone IN FRAME DEFAULT-FRAME.
END PROCEDURE.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

&Scoped-define SELF-NAME BtnDone
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL BtnDone C-Win
ON CHOOSE OF BtnDone IN FRAME DEFAULT-FRAME /* Ok */
DO:
....
chCtrlFrame:TreeView4GL:GotoNode(inbNode) NO-ERROR.
/* where inbNode is the number of nodes in the treeView or whatever else like 1 */
APPLY "CLOSE":U TO THIS-PROCEDURE.
END.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


EtienneD
 
Back
Top