OAProfessor

Deep OA Product Insight

User Tools

Site Tools


popupmessagebox

Don't make your own message popup panels for your project, use the ones that are already made. Sadly, they are hidden in help.

Search in the help system for “Standard dialogs” to find the discussion on these very useful popups.

You then use the button wizard and it creates the code like:

ChildPanelOnCentralModal("vision/MessageInfo1", "",
                         makeDynString("$1:" + "Stop snapshot or playback before closing"));

Check out the other messageInfo panels and the messageWarning panels for the complete set.

NOTE: sometimes the ChildPanel… call needs to have a name for the window (the second parameter) to work properly.

  dyn_float dfRet;
  dyn_string dsRet;
 
  ChildPanelOnCentralModalReturn("vision/MessageStop", "HistoryDatabase",
                         makeDynString("$1:" + "This action will loose data logged after save date",
                                       "$2:" + "Restore",
                                       "$3:" + "Cancel"),
                         dfRet, dsRet);
  if(dsRet[1] == "true")                        // string reply is lower case
  {
    //do work here
  }

There is even one for entering a value. Don't build them if they are already there!

popupmessagebox.txt · Last modified: 2023/03/14 14:32 by toddmalone

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki