Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Русский


uimenu properties

Description of uimenu properties.

Description

This page lists all available properties for menus in Scilab GUI.

These properties can be set at creation through the uimenu function, or at any time later with the handle.property = value usual syntax.

Several properties can also be changed in the same time using the set(handle, "propName1",propValue1, "propName2",propValue2, ..) function.

Properties

Callback

String

Instruction evaluated by the Scilab interpreter when the menu is activated. Under MacOSX, the callback will not be executed for a "button menu" (a menu without children), you must specify at least a child.

If any, every occurrence of the "[SCILAB_FIGURE_ID]" substring is replaced in the callback string with the figure_id value of the parent figure, at calling time .

Callback_Type

Scalar. Integer code setting the way the callback string must be interpreted to perform the action:

-1: callback disabled.
0: (default) non prioritary (or interruptible) Scilab instructions. Example: .callback = "help(""uimenu"")"
1: Fortran function
2: non prioritary (or interruptible) Scilab function.
3: Java reference. Example: .callback = "org.scilab.modules.gui.editor.EditorManager.start([SCILAB_FIGURE_ID])"
10: prioritary (or non-interruptible) Scilab instructions.
12: prioritary (or non-interruptible) Scilab function

Checked

on | {off}

Item check indicator. Setting this property to "on" the first time displays a checkbox in head of the item's label, and then checks it. Setting "off" keeps the checkbox and unchecks it. This property can be used to display items indicating the state of particular options.

Remarks:

  • There is no way to remove the checkbox after its creation, but deleting the item.
  • By default, no interactive checking or unchecking is possible. Such interactions can be implemented through the Callback property.
  • This property is ignored for parent menus.

Children

vector of handles

If the current uimenu item is a menu listing subitems, their handles are gathered in this Children property. All of them should be of type "uimenu". Otherwise, .Children is the empty matrix [].

Enable

{on} | off

Enable or disable the menu. If this property is set to "on" (default), the menu is operational, but if this property is set to "off", the menu will not respond to the mouse actions and will be grayed out.

ForegroundColor

[1,3] real vector or string

Foreground color of the uimenu (font color). A color is specified as Red, Green and Blue values. Those values are real in [0,1]. The color can be given as a real vector, ie [R,G,B] or a string where each value is separated by a "|", ie "R|G|B".

Handle_visible

on | {off}

Setting it to "on" forces the uimenu handle to be visible in the list of its parent children, even if get(0).showhiddenhandles == "off".

Setting it to "off" does NOT force it to be hidden: get(0).showhiddenhandles == "on" is stronger.

Icon

String.

This property represents the relative (to Scilab working directory) or absolute path of the image file to be used as icon for the menu.

Label

String.

This property represents the text appearing in the menu. If the text is enclosed between two $ (dollar sign), then it will be considered as a LaTeX expression. If it is enclosed between < and >, it will be considered as a MathML one.

If the text value starts with <html>, then all HTML-4 tags used in the label afterward are interpreted. This allows for instance to use HTML styling tags like <b>..</> for bold, <span color="red">..</span> to use a red font, etc.

Tag

String

This property is generally used to identify the menu. It allows to give it a "name". Mainly used in conjunction with findobj().

TooltipString

String or String vector

This property represents the text of the uimenu tooltip appearing when the mouse is over the uimenu.

User_data

Any type of data

This property can be used to store any scilab user or application data. In order to be easily extensible and portable, using a structure with fields is advised. [] is set by default.

Visible

{on} | off

Set the visibility of the uimenu. If this property is set to "on" (default), the uimenu is visible, but if this property is set to "off", the uimenu will not appear in its parent figure.

See also

  • uimenu — Create a menu or a submenu in a figure
  • uicontextmenu — Creates a contextual menu
  • uicontrol — create a Graphic User Interface object
  • showHiddenHandles — Description of console object properties.
  • set — set properties of some graphic objects or uimenus or uicontrol interactive components
  • LaTeX and MathML — Display mathematical equations in Scilab graphics through the LaTeX or MathML languages.

History

ВерсияОписание
5.4.0 Handle_visible property added.
5.5.0 Icon property added.
2025.0.0 TooltipString property added.
Report an issue
<< uimenu Menus unsetmenu >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:18:33 CEST 2024