Documentation‎ > ‎Containers‎ > ‎

gnocl::infoBar

A that can be used to show messages without the use of a dialog window.

NB: Page still under construction, there may be some some errors and/or unnotified changes.

Synopsis

gnocl::infoBar [-option value...]

Screenshot


Options

-child string
User defined data which can be retrieved via the cget subcommand.
-type integer (default: 1)
The number of decimal places to display. If set to 0 the value of the scale will be returned as integer.
-default boolean (default: 1)
Whether to draw the value at one side of the slider.
-actionAreaBorder 1
This sets the focus to the widget. To unset the focus it must be set to another widget.
-buttonSpacing boolean (default: 1)
Whether the minimum and maximum are swapped.
-contentAreaBorder float (default: 0)
The lower limit of the scale.
-contentAreaSpacing string
Name of the widget, can be used to set options in an rc file.
-onClose string (default: "")
Tcl command which is executed in the global scope if the "show-help" signal is received, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituted:

%w   widget name.
%d   id of clicked item.
-onResponse string (default: "")
Tcl command which is executed in the global scope if the "show-help" signal is received, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituted:

%w   widget name.
%d   id of clicked item.

Description

A scale widgets lets the user input numerical values. If digits is zero, the value is an integer, else it is a float.

Commands

id add option
Returns the value for one option. The option may have any of the values accepted by configure.
id class 
Returns the value for one option. The option may have any of the values accepted by configure.
id cget option
Returns the value for one option. The option may have any of the values accepted by configure.
id configure [-option value...]
Configures the widget. Option may have any of the values accepted on creation of the widget.
id delete
Deletes the widget and the associated tcl command.

Example


package require Gnocl

set ib [gnocl::infoBar]

# decide how to handle the user response
$ib configure -onResponse {
        switch -- %d \
            $but(OK)     {puts "You clicked the OK button."} \
            $but(CANCEL) {puts "You clicked the CANCEL button."} \
            default      {puts "You clicked something else!"}
         }

# create items to display in the acivation area.
set box [gnocl::box]
set lab [gnocl::label -text "Add Extra Items Here!"]
$box add $lab -fill {1 0} -expand 1

# add widgets to the infoBar
$ib configure -child $box

# create buttons and obtain their ids
set but(OK) [$ib add button OK]
set but(CANCEL) [$ib add button Cancel]

gnocl::window -child $ib
Comments