brixxbox Wiki
Ask or search…
K

Widget

A Widget is another structural control in Brixxbox controls. It is used to group controls.
It is a structural control like groupbox. For a vertical alignment, you can use formgroup, groupbox. Widget is the advanced form of formgroup. User can use it inside a WidgetContainer also. Like groupBox, it also has a header and a border.

Documentation

In Brixxbox, app configuration allows you to add different controls in your app. It also provides four types of properties which manages how control should behave or look in app. Those four property types are:
  1. 1.
    General Properties
  2. 2.
    Size
  3. 3.
    Style
  4. 4.
    Translation
General Properties

These are the main properties of any control. These properties define how control behaves in Brixxbox App.
  • Control Type
- For using grid control, click on "Add Control" and select "Widget" control type from drop down list.
  • Control Id
- For each Brixxbox app, this id should be unique. For Example: "_abcdef". Brixxbox allows you to change its value only once. You can change this id to any value but it should be meaningful. Recommended way is to start with mandatory prefix(set in app). It can contain numbers, underscores, uppercase and lowercase letters.
  • Label
- It is the display value for control. It should be meaningful.
  • Refers to Config
- You need to set this option if this is a field, that other fields refer to, to get data from another config.

Tutorial

In this tutorial, we will see what a widget is and how to use it to achieve vertical grouping of controls. This control is purely used for structuring controls. For this tutorial, we will be using item app. Our app has 2 controls: item id(numbox), | item name(text box). Our app looks like this:
Now lets see what an empty widget look like. Add a widget control from controls list and add label "Item details" to it:
It is exactly similar to groupbox. In empty condition it has a label and a visible boundary. Now we want to group item id and item name. For that, we need add both item id and item name inside widget. Now these two controls with be placed inside it and if there are other controls present, Brixxbox will try to place other controls in horizontal fashion, wherever it finds a place. Our app now looks like this:
As we can see in the above snapshot that item id and item name controls are placed inside widget and widget containing them has a clear boundary and a header.