Skip to content

Instantly share code, notes, and snippets.

@jbratu
Last active November 25, 2016 20:23
Show Gist options
  • Save jbratu/1bef2e694045347076d8 to your computer and use it in GitHub Desktop.
Save jbratu/1bef2e694045347076d8 to your computer and use it in GitHub Desktop.
The Popup function (see https://wiki.srpcs.com/display/Commands/Popup+Function) is very flexible but with flexibility comes complexity. This is a code example showing a multi-column Popup with literal data.
$Insert POPUP_EQUATES
Declare Function Popup
PopDisp = ''
PopDisp<PCOL$> = -1
PopDisp<PROW$> = -1
PopDisp<PWIDTH$> = -1
PopDisp<PHEIGHT$> = -1
PopDisp<PFILE$> = ''
PopDisp<PMODE$> = 'L'
PopDisp<PTITLE$> = 'Please choose a line'
PopDisp<PTYPE$> = 'E'
//Show multi-column list
PopDisp<PDISPLAY$> = "One":@SVM:"A is for Apple":@VM:"Two" :@SVM: "B is for Banna":@VM:"Three":@SVM:"C is for Code"
PopDisp<PFORMAT$> = 1:@SVM:10:@SVM:'L':@SVM:'L':@SVM:'':@SVM:'Num Col':@VM:2:@SVM:25:@SVM:'L':@SVM:'L':@SVM:'':@SVM:'Phrase'
//For simple single column list
/*
PopDisp<PDISPLAY$> = "One":@VM:"Two":@VM:"Three"
PopDisp<PFORMAT$> = 1:@SVM:10:@SVM:'L':@SVM:'L':@SVM:'':@SVM:'Num Col'
*/
Resp = Popup(@WINDOW, PopDisp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment