Skip to main content
1-Visitor
January 25, 2017
Question

Creo Hide Dialog using C++ Object Toolkit and Close button

  • January 25, 2017
  • 1 reply
  • 1693 views

1. How can I show and hide dialog using C++ Creo Object Toolkit? I have designed a dialog using UI styler and wrote corresponding class to cover all buttons etc. How to do a hide a dialog/show?

2. In the creo dialog designer I selected "HasCloseButton" attriute to true. I am creating modal dialogs (if this is important). However, if I run the dialogs, the close button never works. Should I implemented any additional listener to the dialogs to make close button working? At the moment I do not create separate listener class for dialogs....

1 reply

15-Moonstone
January 27, 2017

1. I think you want to close it ?

uifcDialogExit(); would be your friend.

else you can use

uifcDialogFind("", "")->setVisible(false);

2. You need to implement the close action with

uifcDialogFind("", "")->AddActionListener();

else you  can use the ProToolkit alternative way:

ProUIDialogCloseActionSet(dialog, ui_closePanel, NULL);

Br,

Eike

gpytel1-VisitorAuthor
1-Visitor
January 30, 2017

Thank you Eike. I tried everything. As for me: uifcDialogExit works correctly, uifcDialogFind->setVisible does not work at all. I dont know why. Do you think I should contact former PTC support? And the third option: ProUIDialogCloseActionSet works as well.

Thank you for your assistance! Have a nice day!