DDH Software, LLC Making a big world smaller






Return to Knowledgebase Home
Tutorial 11: Conditionally Visible Form Items (Windows Mobile Classic/Professional)
Product: HanDBase Forms for Windows Mobile Classic/Professional (Pocket PC)Article Number: 306Creation Date: 12/07/2007

- Topic: Conditional Display of UI Elements on Forms

- Product: HanDBase Forms

- Version: 4.0

- Date: November 26, 2007

- Handheld OS: Windows Mobile 5, Windows Mobile 6 (Pocket PC)

- 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 Forms 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 handheld device. The first step in doing so is to launch HanDBase in the manner most appropriate for the particular model of handheld being used. 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. To accomplish this, highlight it in the list and select the Menu / Details option by pressing Menu in the lower right corner of the screen.

b) Once the next form displays, select the "Forms" option on the right side of the screen and click “ok”.

c) As soon as HanDBase Forms opens, click “new” to create a new form and configure it’s properties, such as the name, background color and default buttons.

d) After finished, click "ok".

e) The next form appears as a grid with three buttons along the bottom, being "New", "Details" and "Delete".

Step #3:

a) The next step is to place the UI elements on the form. Start by placing text labels on the grid that correspond to each of the four field names by clicking “New” and choosing Label from the resulting popup.

b) The next step is to place UI elements next to each of the respective field names. Again, do this by clicking “New” and selecting the respective UI element types.

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

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

e) Again, place a Text Box for the “Quantity” field and finally 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 tap the “Details…” button.

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:

YouTube Video Version of this tutorial


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 9768 times.

Return to Knowledgebase Home