List Box Subforms

List Box Subform

Introduction

The List Box Subform Component lets you create subforms using the new 4D listbox tool programmatically.

Using a simple API sophisticated subforms can be created in just a few minutes.

Simple example

The listbox subform can be created very simply with just three commands, called in the On Load form event or before the form is loaded.

LBSF_Display (1)`  Subform one is being shown

LBSF_DefineSubform (1;->[Pet];->[Client]ID;->[Pet]Client_ID;->[Pet]Name;

->[Pet]Breed;->[Pet]Sex)

LBSF_SubformPages (1;2)       `  Display subform 1 on page 1

·       The first command specifies that subform # 1 is being shown.

·       Subform # 1 displays data from the

         Pet Table

         The related one field is [Client]ID

         The related many field is [Pet]Client_ID

         Three fields are to be shown in the subform:

          [Pet]Name

         [Pet]Breed

         [Pet]Sex

·       The subform will be visible on page 2 of the form.

 

In the form editor for the Client input form we need to do some setting up:

·       Inherit the LBSF_Subform form

·       Position the subform and button templates on the Client input form.

·       Include LBSF_FM in the form method for the Client input form.

 

The end result:

The release version will be available shortly.

In the meantime, you can download the current source code from our downloads page.

 

Shareware

All Mac to Basics components are open source.

In the case of the LBSF component I am requesting people who use the component pay the share-ware fee of $50 Australian.

I am accepting payments via PayPal for other payment options contact us by email.