Group

Simple example:

with ui.GroupWidget(title='This is a panel'):
    with ui.VBox():
        ui.ProgressBar(value=0.2)
        ui.Button(text='click me')
open in new tab

Interactive example:

from flexx import app, ui, event

class Example(ui.GroupWidget):
    def init(self):
        self.title = 'A silly panel'
        with ui.VBox():
            ui.ProgressBar(value=0.2)
            self.but = ui.Button(text='click me')

    class JS:
        @event.connect('but.mouse_down')
        def _change_group_title(self, *events):
            self.title = self.title + '-'
open in new tab


class flexx.ui.GroupWidget(*init_args, **kwargs)

Inherits from: Widget

Widget to collect widgets in a named group.

It does not provide a layout. This is similar to a QGroupBox or an HTML fieldset.