Difference between revisions of "Menu Get"
From Wiki
(→See Also) |
|||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{command header|Menu}} | ||
| − | + | {{body|menu Get {name} |The [[menu Get]] command returns value associated with a control in the EasyUO menu window in the [[var_menuRes|#menuRes]] system variable. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | [[menu Get]] | + | |
| − | + | Usage with a combo box returns the index of the item selected within the combo box, starting with 0, for nothing selected. | |
| − | + | ||
| + | Usage with a check box returns #true if the checkbox is checked, #false if it is not.}} | ||
| + | |||
| + | {{note|Clicking menu button's (including the window's close button) set's [[var_menuButton|#menuButton]] without the need to use menu Get.}} | ||
==== Example ==== | ==== Example ==== | ||
| Line 16: | Line 16: | ||
menu Get edit_1</pre> | menu Get edit_1</pre> | ||
| − | ==== | + | ==== Example w/ ComboBox ==== |
| − | + | <pre> | |
| − | + | menu show | |
| − | + | menu combo create test 0 0 100 | |
| − | + | menu combo add test One | |
| − | + | menu combo add test Two | |
| − | + | menu combo add test Three | |
| − | + | pause | |
| − | + | menu get test | |
| + | display ok #menures | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | =See Also= | ||
| + | {{Menu}} | ||
Latest revision as of 12:28, 13 September 2007
Synopsis
menu Get {name}
Description
The menu Get command returns value associated with a control in the EasyUO menu window in the #menuRes system variable.
Usage with a combo box returns the index of the item selected within the combo box, starting with 0, for nothing selected.
Usage with a check box returns #true if the checkbox is checked, #false if it is not.
| Note: | Clicking menu button's (including the window's close button) set's #menuButton without the need to use menu Get. |
Example
; This will save the text in the edit field named edit_1 into the ; variable #menuRes. This will only work for edit field items. ; #menuRes will return as a string. menu Get edit_1
Example w/ ComboBox
menu show menu combo create test 0 0 100 menu combo add test One menu combo add test Two menu combo add test Three pause menu get test display ok #menures
See Also
Menu
- Commands to interact with menu elements.
| menu Activate | Activates a window element in the EasyUO menu window |
| menu Button | Creates a button at position x/y with specified size on the EasyUO menu window |
| menu Check | Creates a checkbox at position x/y with specified size on the EasyUO menu window |
| menu Clear | Clears all window elements from the EasyUO menu window |
| menu Combo | Creates a combobox at position x/y with specified size on the EasyUO menu window or adds entries to the combobox |
| menu Delete | Deletes a window element from the EasyUO menu window |
| menu Edit | Creates a edit field at position x/y with specified width in the EasyUO menu window |
| menu Font Align | Changes the font alignment in the EasyUO menu window |
| menu Font BGColor | Changes the font background color in the EasyUO menu window |
| menu Font Color | Changes the font color in the EasyUO menu window |
| menu Font Name | Changes the font in the EasyUO menu window |
| menu Font Size | Changes the font size in the EasyUO menu window |
| menu Font Style | Changes the font style in the EasyUO menu window |
| menu Font Transparent | Sets the transparency of the background color of the font |
| menu Get | Returns the value associated with a control in the EasyUO menu window |
| menu GetNum | Returns the number in an edit field in the EasyUO menu window |
| menu Hide | Hides the EasyUO menu window |
| menu HideEUO | Hides the main EasyUO window |
| menu Image Create | Creates a new image control in the menu |
| menu Image Ellipse | Draws an ellipse/circle within a specified image |
| menu Image File | Loads an external image file |
| menu Image FloodFill | Applies the FloodFill effect in the area around a specified pixel within a specified image |
| menu Image Line | Draws a line within a specified image |
| menu Image Pix | Paints a single pixel within a specified image |
| menu Image PixLine | Prints a horizontal line of pixels within a specified image |
| menu Image Pos | Moves an already existing image control to a different position |
| menu Image Rectangle | Draws a rectangle within a specified image |
| menu List | Creates a listbox at position x/y with specified size on the EasyUO menu window or adds entires to the listbox |
| menu Set | Sets the text of a control |
| menu Shape | Creates a shape in the EasyUO menu window |
| menu Show | Shows the EasyUO menu window |
| menu Text | Creates a label at the specified position in the EasyUO menu window |
| menu Window Color | Changes the color of the EasyUO menu window |
| menu Window Size | Changes the size of the EasyUO menu window |
| menu Window Title | Changes the title of the EasyUO menu window |
| menu Window Transparent | Sets the transparency of the window |