Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Name

qcritical — information dialog displaying a critical message

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

qcritical caption text [button-0-text

_

]

\

[

_

button-1-text

_

]

\

[

_

button-2-text

_] {panel} h2. Description The *qcritical* command displays a

]

Description

The qcritical command displays a read-only

...

warning

...

dialog

...

with

...

one

...

or

...

more

...

buttons,

...

with

...

a

...

caption.

...

The

...

default

...

is

...

a

...

single

...

'OK'

...

button.

...

The

...

dialog

...

is

...

modal,

...

therefore

...

execution

...

is

...

halted

...

until

...

the

...

user

...

closes

...

the

...

dialog.

...

An

...

accompanying

...

red

...

icon

...

underlines

...

the

...

severity

...

of

...

the

...

message.

...

The

...

dialog

...

may

...

optionally

...

have

...

up

...

to

...

three

...

buttons

...

to

...

replace

...

the

...

default

...

'OK'

...

button.

...

The

...

buttons

...

are

...

implicitly

...

numbered

...

0,

...

1,

...

2.

...

The

...

command

...

will

...

return

...

the

...

number

...

corresponding

...

to

...

the

...

button

...

pressed

...

by

...

the

...

user.

...

Arguments

caption

Dialog title.

text

The main text of the dialog

button-x-text

...

Text

...

to

...

appear

...

on

...

button

...

number

...

x.

...

There

...

may

...

be

...

1,

...

2,

...

or

...

3

...

buttons

...

provided

...

in

...

place

...

of

...

the

...

default

...

'OK'

...

button.

...

Examples

Ex.1:

...

Critical

...

dialog

...

Anchor
Critical dialog
Critical dialog

No Format
bgColor#eeeeee
borderWidth1
# A dialog showing a critical message
qcritical "Critical Error" "Failed to find entry"

{noformat}

!att:_img_cmd^qcritical.png!

The above example shows the simplest possible use of *qcritical*. The 'OK' button is created automatically. 

h3. 

Image Added

The above example shows the simplest possible use of qcritical. The 'OK' button is created automatically.

Ex.2:

...

Critical

...

dialog

...

with

...

extra

...

buttons

...

Anchor
Critical dialog with extra buttons
Critical dialog with extra buttons

No Format
bgColor#eeeeee
borderWidth1
# Critical message with title and buttons. 
# Returns 0 (OK), 1 (Cancel), 2 (Details)
set button [qcritical Error "Failed to open file" OK Cancel Details]
if { $button == 0 } {
	# OK button was pressed
} elseif { $button == 1 } {
	# Cancel buttons was pressed
} elseif { $button == 2 } {
	# Details buttons was pressed
}

{noformat}

!att:_img_cmd^qcritical_buttons.png!

Example [#Critical dialog with extra buttons] shows a warning dialog with a title and extra buttons. The number 0, 1, or 2 is returned to the program, depending on which button the user clicks. 

Image Added

Example Critical dialog with extra buttons shows a warning dialog with a title and extra buttons. The number 0, 1, or 2 is returned to the program, depending on which button the user clicks.