widget-state: Get and set state of Tk widgets.

widget-stateR Documentation

Get and set state of Tk widgets.

Description

Get or modify the state of Tk widgets.

Usage

tk_get_default_enabled_state(obj, ...)

tk_set_default_enabled_state(obj, state, ...)

tk_get_state(obj, ...)

tk_set_state(obj, state, ...)

tk_normalize(obj, ...)

tk_activate(obj, ...)

tk_read_only(obj, ...)

tk_enable(obj, ...)

tk_disable(obj, ...)

## Default S3 method:
tk_get_default_enabled_state(obj, ...)

## Default S3 method:
tk_get_state(obj, ...)

## Default S3 method:
tk_set_default_enabled_state(
  obj,
  state = c("active", "normal", "readonly"),
  ...
)

## Default S3 method:
tk_set_state(obj, state, ...)

## Default S3 method:
tk_normalize(obj, ...)

## Default S3 method:
tk_activate(obj, ...)

## Default S3 method:
tk_read_only(obj, ...)

## Default S3 method:
tk_disable(obj, ...)

Arguments

obj

Tk widget or a string with the ID of an existing Tk widget (e.g., ".1.2.5").

...

other options to be passed to tcltk::tkconfigure().

state

(character) The state of widget. Usually one of "normal", "active", "diabled", "readonly".

Details

The function to get widget's state:

  • tk_get_state()

The functions to set widget's state to:

  • tk_normalize() to "normal";

  • tk_activate() to "active";

  • tk_read_only() to "readonly";

  • tk_disable() to "disable";

  • tk_enable() to default non-disabled state;

  • tk_set_state() to the indicated state.

The functions to manage widget's state to:

  • tk_get_default_enabled_state() get default default enabled state. If not set, "normal" is returned.

  • tk_set_default_enabled_state() change the default enabled state to either "normal", "active" or "readonly".

See Also

tcltk::tkconfigure()

Examples

# tk_get_state(obj)
# tk_get_state(".1.2.5")

# tk_disable(obj)
# tk_normalize(obj)
# tk_set_state(obj, "normal")

GegznaV/RcmdrPlugin.BioStat documentation built on May 8, 2023, 7:41 a.m.