Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Block UI Styler Node Tree - How to edit node display text by Doule Click?

NX 10.0.3 NXOpen C++ Windows 64x

 

I created a NodeTree block in my UI.  I found that users can only triple click the node rather than double click to make the text in edit. For example users have to triple click the 176.37 to make it editable. How can I solve the problem?

 

I use SetOnBeginLabelEditHandler and SetOnEndLabelEditHandler to edit the node display text in a specified column.

20160728110658.png

 

 

2 REPLIES
Solution
Solution
Accepted by topic author Xiang
‎09-26-2016 11:35 PM

Re: Block UI Styler Node Tree - How to edit node display text by Doule Click?

Hi Xiang,

 

I too had this problem while editing the node in the column. I solved the problem by simulating a left mouse click action once when the user double click on the column. We can the add simulating/auto-click of left mouse click program in the SetOnDefaultActionHandler callback. This callback is triggered once the user double clicked on the node. It worked for me.

 

Thanks and Regards,

Deepak

Re: Block UI Styler Node Tree - How to edit node display text by Doule Click?

Hello Deepak,

 

Thank you so much. I pasted the code below. It seems can only be applied to Windows, is there any way to do this at LINUX system?

 

Regards, Xiang

 

#ifdef _WIN32
    #include <Windows.h>
#endif


void Modeling:Smiley SurprisednDefaultAction(NXOpen::BlockStyler::Tree *tree, NXOpen::BlockStyler::Node *node, int columnID)
{
#ifdef _WIN32
    INPUT Input = { 0 };

    Input.type = INPUT_MOUSE;
    Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
    :Smiley FrustratedendInput(1, &Input, sizeof(INPUT));

    ::ZeroMemory(&Input, sizeof(INPUT));
    Input.type = INPUT_MOUSE;
    Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
    :Smiley FrustratedendInput(1, &Input, sizeof(INPUT));
#endif
}