// Script function: Create a popup dialog.

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html


Class GlobalSinoDialog : UIFrame
{  
  TagGroup EMCreateDialog( object EMObject )
  {
   TagGroup MyDialog = DLGCreateDialog("")
 
// =========== Definition of popup window begins =====
   TagGroup EMLabelBox, MyItems, MyFrame, EMFrame
   EMLabelBox = DLGCreateBox("Checkbox Test", MyItems)
   EMFrame = DLGCreateBox("", MyFrame)
   MyFrame.DLGAddElement(EMLabelBox.DLGTableLayOut(2, 1, 1))
   EMLabelBox.DLGAddElement(DLGCreateCheckBox("Check box"))
// =========== Definition of popup window ends =======
               
    MyDialog.DLGAddElement(EMLabelBox)
    return MyDialog
  }
                               
  GlobalSinoDialog( object EMObject )
  {
   EMObject.init( EMObject.EMCreateDialog() )
  }
}
 
void main()
 {                             
    object GlobalSinoDialog = Alloc(GlobalSinoDialog)
    GlobalSinoDialog.Display("GlobalSino Dialog")
    documentwindow dialogwin=getdocumentwindow(0)
    Return
  }
 
main()

// Script comparison: http://www.globalsino.com/EM/page2597_alloc_uiframe.s
 