Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
can anybody help me how to create popup with button click.The popup must contains label,TextFeild and button.
Do you mean java (j-link) ?
Hi Sangavi,
A couple of quick questions
If you are looking for an actual "Dialog" box - I would highly recommend using Creo's "UI Editor" to help create your dialog. It is quick and easy to create a dialog with the layout you want, and it will even auto-generate C++ code for you.
On the other hand... if you are using ProToolkit, and only need a dialog box with some "standard" buttons, then ProUIMessageDialogDisplay should do the trick.
"Standard buttons" include:
Some example code (NOTE: I haven't tested this - so hopefully it works haha):
ProError hello_world {
ProError err = PRO_TK_NO_ERROR;
ProUIMessageType message_type = PROUIMESSAGE_INFO;
ProUIMessageButton *buttons;
ProUIMessageButton ok_button = PRO_UI_MESSAGE_OK;
ProUIMessageButton cancel_button = PRO_UI_MESSAGE_CANCEL;
err = ProArrayAlloc(0, sizeof(ProUIMessageButton), 1, (ProArray*)&buttons);
err = ProArrayObjectAdd((ProArray*)&buttons, -1, 1, &ok_button);
err = ProArrayObjectAdd((ProArray*)&buttons, -1, 1, &cancel_button);
ProUIMessageButton user_picked_this_one = PRO_UI_MESSAGE_CANCEL; // set an initial value just incase
err = ProUIMessageDialogDisplay(message_type, L"Hello World", L"Hello, World!\nThis is a popup.", buttons, ok_button, &user_picked_this_one);
if (err == PRO_TK_NO_ERROR && user_picked_this_one == PRO_UI_MESSAGE_OK) {
return PRO_TK_NO_ERROR; // hooray! ^_^
}
return PRO_TK_USER_ABORT;
}
"pfcSession::UIShowMessageDialog" is the OTK (C++) equivalent.
Let me know if this works for you, and feel free to PM me if you have more questions.
Thanks,
James Sullivan