Package libxyz :: Package ui :: Module box_button :: Class ButtonBox

[hide private]
[frames] | no frames]

# Class ButtonBox

source code

    Box --+
          |
         ButtonBox

Button box. Shows a message and waits for button pressed

Instance Methods | [hide private]

__init__(self, xyz, body, message, buttons, title="", width=70) | source code

show(self, dim=None) Show box and return pressed button value. | source code

_init_buttons(self, buttons) | source code

_change_focus(self, keys) Move focus | source code

_pressed(self, button) Button pressed | source code

Class Variables | [hide private]

| resolution = `u"button_box", u"box", u"widget"`

Method Details | [hide private]

### __init__(self, xyz, body, message, buttons, title="", width=70)
(Constructor)

source code

Parameters:
  - `xyz` - XYZ dictionary
  - `body` - Top-level widget
  - `message` - Message to display
  - `buttons` - List of button pairs (text, value). Text is what button shows and value is what being returned.
  - `title` - Box title
  - `width` - Box width (including mount box)

    Required resources: title, box, border, mount, button