15.3.3.13 按钮组属性

uibuttongroup 对象的属性(参见 uibuttongroup):

类别:

外观 | 按钮组操作 | 回调执行 | 创建/删除 | 显示 | 鼠标交互 | 对象标识 | 对象位置 | 父对象/子对象 | 文本外观

外观

backgroundcolor: colorspec, def. [0.9400 0.9400 0.9400]

此按钮组的背景颜色值。

bordertype: "beveledin" | "beveledout" | {"etchedin"} | "etchedout" | "line" | "none"

设置按钮组周围是否显示线条边框。

borderwidth: whole number scalar, def. 1

线条边框的宽度(以像素为单位)。

foregroundcolor: colorspec, def. [0 0 0]

此按钮组标题文本的颜色值。

highlightcolor: colorspec, def. [1 1 1]

此按钮组边框线的颜色值。

shadowcolor: colorspec, def. [0.7000 0.7000 0.7000]

此按钮组边框线外侧环绕线的颜色值。

sizechangedfcn: string | function handle, def. [](0x0)

按钮组大小更改时触发的回调。

有关如何编写图形监听器函数的信息,请参阅 回调部分

按钮组操作

selectedobject: def. [](0x0)

按钮组中当前选中项目的图形句柄。

回调执行

busyaction: "cancel" | {"queue"}

定义当 Octave 无法中断另一个对象正在执行的回调时,如何处理此对象回调属性的执行。这仅当当前正在执行回调的对象的 interruptible 属性设置为 "off" 时才相关。中断回调对象的 busyaction 属性指示该中断回调是排队("queue"(默认))还是丢弃("cancel")。 另请参阅 回调部分.

interruptible: "off" | {"on"}

指定此对象的回调函数是否可以被其他回调中断。默认情况下,interruptible"on",使用 drawnowfigurewaitforgetframepause 函数的回调最终可被中断。 另请参阅 回调部分.

resizefcn: string | function handle, def. [](0x0)

resizefcn 已弃用。请改用 sizechangedfcn

selectionchangedfcn: string | function handle, def. [](0x0)

按钮组中选中项目发生更改时触发的回调。

有关如何编写图形监听器函数的信息,请参阅 回调部分.

创建/删除

beingdeleted: {"off"} | "on"

指示已有函数启动了此对象删除过程的属性。beingdeleted 保持为 true,直到该对象不再存在为止。

createfcn: string | function handle, def. [](0x0)

在创建 uibuttongroup 后立即执行的回调函数。此函数通常通过根对象的默认属性来设置,例如 set (groot, "defaultuibuttongroupcreatefcn", 'disp ("uibuttongroup created!")').

有关如何编写图形监听器函数的信息,请参阅 回调部分.

deletefcn: string | function handle, def. [](0x0)

在删除 uibuttongroup 之前立即执行的回调函数。

有关如何编写图形监听器函数的信息,请参阅 回调部分.

显示

clipping: "off" | {"on"}

如果 clipping"on",则 uibuttongroup 在其父轴的限制范围内被裁剪。

visible: "off" | {"on"}

如果 visible"off",则 uibuttongroup 不会显示在屏幕上。

鼠标交互

buttondownfcn: string | function handle, def. [](0x0)

有关如何编写图形监听器函数的信息,请参阅 回调部分.

contextmenu: graphics handle, def. [](0x0)

当前与此 uibuttongroup 对象关联的 uicontextmenu 对象的图形句柄。

hittest: "off" | {"on"}

指定 uibuttongroup 是处理鼠标事件还是将其传递给对象的父级。启用后,对象可以通过执行 "buttondownfcn"、显示 uicontextmenu 并最终成为根对象的 "currentobject" 来处理鼠标单击。仅当对象可通过 "pickableparts" 属性接受鼠标单击时,此属性才生效。另请参阅 pickableparts 属性.

pickableparts: "all" | "none" | {"visible"}

指定 uibuttongroup 是否接受鼠标单击。默认情况下,pickableparts"visible",只有 uibuttongroup 的可见部分或其子项可以对鼠标单击做出反应。当 pickableparts"all" 时,可见和不可见部分(或子项)都可能对鼠标单击做出反应。当 pickableparts"none" 时,鼠标在该对象上的单击将被忽略,并传递到该对象下方的任何对象。当对象配置为接受鼠标单击时,"hittest" 属性将决定如何处理它们。另请参阅 hittest 属性.

selected: {"off"} | "on"

指示此 uibuttongroup 是否被选中。

selectionhighlight: "off" | {"on"}

如果 selectionhighlight"on",则 uibuttongroup 的选中状态会以视觉方式高亮显示。

对象标识

tag: string, def. ""

用于标识图形对象的用户定义字符串。

type (read-only): string

图形对象的类名。type 始终为 "uibuttongroup".

userdata: Any Octave data, def. [](0x0)

要与图形对象关联的用户自定义数据。

对象位置

position: four-element vector, def. [0 0 1 1]

按钮组的大小,表示为四元素向量 [左, 下, 宽, 高]。

units: "centimeters" | "characters" | "inches" | {"normalized"} | "pixels" | "points"

用于解释 "position" 属性的度量单位。

父对象/子对象

children (read-only): vector of graphics handles, def. [](0x0)

uibuttongroup 的子对象的图形句柄。

handlevisibility: "callback" | "off" | {"on"}

如果 handlevisibility"off",则 uibuttongroup 的句柄在其父对象的 "children" 属性中不可见。

parent: graphics handle

父图形对象的句柄。

文本外观

fontangle: "italic" | {"normal"}

控制字体是斜体还是正常体。

fontname: string, def. "*"

用于文本渲染的字体名称。设置此属性时,文本渲染引擎将在系统中搜索匹配的字体。如果未找到,则使用默认的无衬线字体(与默认的 "*" 值相同)。

编程说明:在非 Linux 系统(即本机不使用 FontConfig 的系统)上,字体缓存在安装 Octave 时构建。安装新字体后,您需要手动运行 system ("fc-cache -fv")

fontsize: scalar, def. 10

用于文本渲染的字体大小。另请参阅 fontunits 属性.

fontunits: "centimeters" | "inches" | "normalized" | "pixels" | {"points"}

用于解释 "fontsize" 属性的单位。

fontweight: "bold" | {"normal"}

控制用于文本渲染的基本字体的粗细。

title: string, def. ""

按钮组的标题文本。

titleposition: "centerbottom" | "centertop" | "leftbottom" | {"lefttop"} | "rightbottom" | "righttop"

标题在按钮组中的相对位置。