Kushal Tutorials - Document

Creating Menu and Forms in Kushal

In the previous Section, you have already created a Project. In this Section, you will learn how you can add functionality to the Project by adding Menu and Forms.

You will require only 3 Menu Items in this application.

  • Salutation
  • Relationship
  • Contact Editor

Let us select 'Menu Definition' Icon from the Ribbon.

Select 'file' Menu Item and then Click on 'Add Root Menu' a New Menu will be created. Now click on 'Rename' button and call that menu as 'Main'.

Right Click on 'Main' Menu and then Click on 'Add Sub Menu' and Create the 3 required Sub Menus - Salutation, Relationship and Contact Editor. Now since you have not yet designed Forms, you will not be able to assign any functionality to menus.

Using arrow buttons provided on right side of the Menu designer, it is possible to move the menu items up and down and also change the Menu Level.

As you change the menu Items, Menu gets changed in this window. You can get a preview of your menu design in the same window.

Now let us Create Forms

When you create Project, Kushal will automatically create all the default forms. This can be viewed by enabling 'Show Default Forms checkbox. Note that Kushal has already created many forms. You will not be able to change much in these Forms except captions and images.

You can turn off default Forms option and focus on Creating New Forms which are specific to your Project

Click on New Form - A window opens, where you will be able to select the type of form that you want. Kushal offers many types of Forms which find application depending on varying requirements. However, in this sample project, you have a very simple database design and you can create all your Forms using 'Single Grid' Form as you will just input data in the tables.

Select 'Salutation' table and Select 'Salutation' as the Primary Key Field and Click on 'Create' Button. A New Form will be created with all the required buttons such as 'New', 'Save', 'Delete', 'Search' & 'Export'. All of them will have predefined actions. You can delete them if not necessary and change their properties if required.

Similarly, you can Create 'Relationship' Form and 'Contact_Master' Forms.

In Salutation and Relationship Forms, you don't have many things to be changed. But in 'Contact_Master' table you should make some changes. Since 'Salutation' and 'Relationship' should be selected from master tables you have to Change the text box to Dropdown Control.

To change Textbox to Drop down - you should right-click on the TextBox and Change it to drop down. Once dropdown control is created, you can assign SQL Statement to fetch records from Salutation Table. You should give "Select Salutation from Salutation" as SQL Statement.

Similarly, you can change Category as a Dropdown

Now you can add 2 More Buttons to access Salutation and Category directly from Contact_Master Form.

When you create a New Button - you should Change Action Type to 'Show Form' and then assign 'Salutation' in Form Name. Similarly, you can assign 'Relationship' Form to Relationship button.

You can add a Search Form - As one of the requirements is to Search Contacts depending on Inputs provided.

You can click on 'New Form' in Forms Tab and Select 'Search Form' and select 'Contact_Master' as the Table Name. Now Kushal` will open another window and ask you which all the fields you want to include in Search. Select 'Email Id', 'Phone Number' & 'Relationship' as fields and '_Anywhere' as another field and Click on OK.

Kushal will create a Search form. Further changes can be done here but You can just go ahead and assign it to Search form.

Now you have completed designing all Forms. You can now assign Forms to Menus. Come back to Menu Definition Screen. Select 'Salutation' and Right Click and Select 'Salutation' form. Similarly, you can select 'Relationship' and 'Contact_Master' forms.

Now you are ready to build the application.

In the next Section, you will learn to generate the Application in Kushal.

Thank you