Skip to main content

Option-Disc

Command Description

Pop up the optional disc with up to eight options, and each option represents one index value (from 0 to 7) in turn. When an option is selected, the optional disc closes and returns its index value. The optional disc can be closed directly when "Esc" is pressed, and the index value "-1" will be returned. Subsequent logical branch design can be carried out in the process based on the index value, for example, when the index value is 1, the process is executed to subprocess A, when the index value is 5, the process is executed to subprocess B, and so on

Command Prototype

iRet = Dialog.TurnTable(arrOption,tips)

Parameter Description

ParameterRequiredTypeDefaultDescription
arrOptionTrueexpression["A", "B", "C", "D", "E", "F", "G", "H"]The option is configured as an array containing 1-8 elements (if there are more than 8 elements, the following content will be ignored). When the array is in the format of ["A","B","C","D","E","F","G","H"], that is, the element of the array are strings, and the disk option name is displayed as the first 4 characters of the array element. When the array is in the format of [["A", "first option"], ["B","second option"], ["F", "third option"]]), meaning the element of the array are one-dimensional arrays, prompt text will be displayed when the mouse cursor hovers over the option, such as "first option"
tipsTruestring""When the mouse is moved to the center of the disc, the prompt is displayed. It is by default empty

return

iRet,The variable used to save the output of the command.

Demo

Dim iRet 
iRet = Dialog.TurnTable(["Jing","Shanghai","Jin","Min","Huang","Guangdong","Hong Kong","Australia"],"")
TracePrint(iRet)
/**
The output result is the subscript of the option selected by the user
For example:
sRet = 3
*/