
// Script function: Input dialog for popup options

// 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


TagGroup GlobalSino, MyItems 

GlobalSino = DLGCreateDialog( "String entry", MyItems ) 
 
TagGroup EMPopup = DLGCreatePopup(0) 

EMPopup.DLGAddPopupItemEntry( "Popup 0" )
EMPopup.DLGAddPopupItemEntry( "Popup 1" )
EMPopup.DLGAddPopupItemEntry( "Popup 2" )
EMPopup.DLGAddPopupItemEntry( "Popup 3" )
 
MyItems.DLGAddElement( DLGCreateLabel( "Please select popup:" ) )    
 
MyItems.DLGAddElement( EMPopup ) 
 
if ( !Alloc( UIframe ).Init( GlobalSino ).Pose() ) exit (0) 
 
string SelfLabel       
 
Result( "Selected popup entry/index: " + EMPopup.DLGGetValue() + "\n" )
 
if ( EMPopup.DLGGetNthLabel( EMPopup.DLGGetValue(), SelfLabel ) )
 
Result( "Selected popup entry/label: " + SelfLabel + "\n" ) 
 
Result( "\n\n" )
