DDH Software, LLC Making a big world smaller






Return to Knowledgebase Home
Tutorial 11: Conditionally Visible Form Items (Windows Desktop)
Product: General HanDBase FormsArticle Number: 307Creation Date: 12/07/2007

- Topic: Conditional Display of UI Elements on Forms

- Product: HanDBase Forms

- Version: 4.0

- Date: November 25, 2007

- Handheld OS: n/a

- Desktop OS: Windows

Tutorial:

This tutorial's goal is to introduce the ability to conditionally display UI elements as a new feature in HanDBase Forms 4.0. This feature's main function is to allow or disallow UI elements to be displayed based on the value or state of another field. Being able to conditionally display UI elements extends the previous functionality of HanDBase Forms by allowing users to create more customized, intuitive user interfaces for collecting data. A practical example of this might be in the creation of grocery shopping list, an inventory system or attendance monitor. In this tutorial, the necessary steps to configure HanDBase and HanDBase Forms on the desktop to take advantage of this new feature will be detailed. Then, the results of properly configuring conditionally displaying user interface elements will be examined. Finally, additional resources will be provided should any further information be needed.

To take advantage of the conditional display of UI elements HanDBase 4 and HanDBase Forms 4 needs to be configured on the desktop computer. The first step in doing so is to launch HanDBase, which can be found at:

Start Menu / All Programs / HanDBase 4/

Once running, the first steps in configuring are:

Step #1:

Create a new database in HanDBase using the following configuration:

Database Title = "Grocery"

Field 1 - Name="Item", Type="Text"

Field 2 - Name="Purchase", Type="Check-Box"

Field 3 - Name="Quantity", Type="Integer"

Field 4 – Name=”Category”, Type=”Text”

Step #2:

a) Once the "Grocery" database has been created a form needs to be created that is associated with it.

b) To accomplish this, select the "Forms" option on the right side of the screen and click “ok” in the dialog that appears after database creation.

c) As soon as HanDBase Forms opens, click “new” in the Form Browser window.

d) If the Form Browser window is not visible, enable with by choosing the menu option View / Show Form Browser.

e) The Form Details window (visible on the left side of the screen) is used to configure it’s properties, such as the name, background color and default buttons.

Step #3:

a) The next step is to place the UI elements on the form. The toolbar visble at the top of the window contains buttons, that when pressed, insert different ones onto the form. Move the mouse over the individual buttons to see the action associated with each of them.

b) Start by placing text labels on the grid that correspond to each of the four field names by clicking the Label button in the toolbar.

c) Click within the form display window to initially position the element.

d) The next step is to place UI elements next to each of the respective field names. Again, do this by selecting the respective UI element types from the toolbar.

e) For the “Item” field, place a Text Box.

f) For the “Purchase” field, a Check-Box.

g) Again, place a Text Box for the “Quantity” field.

h) Finally, place a Pop-Up for the “Category” field.

Step #4:

The final step is to set the visibility of certain elements on the form to only be visible based on the value of another field. For this example, the value of the Purchase field will determine whether or not the Quanity and Category field information is shown. If the value of the Purchase field is zero (0) or the checkbox is unchecked, then the Quantity and Category fields are not visible. If the value is one, or the box is checked, then the fields are visible so that data can be entered into them.

a) To configure this, select each of the items one at a time and configure them in the Details window at the left.

b) On the Attributes tab, set the “visible” option to conditionally.

c) Choose the field that is to have a non-zero value to be the “Purchase” field.

After setting up HanDBase Forms 4 to make use of the ability to conditionally display UI elements on the form, when editing data in the form or when adding a new record, toggling the Purchase checkbox will indicate whether or not the Quantity and Category UI items are visible.

To summarize, this tutorial has introduced the ability to conditionally display UI elements as one of the many new features in HanDBase Forms 4. Additional resources, if needed, can be found at:

1 link to video version of tutorial

2 link to download database files used in the tutorial

If further assistance is needed, please contact DDH Software's technical support at http://www.ddhsoftware.com/support


This article has been viewed 1 times.

Return to Knowledgebase Home