Design Edit-Form

Now we have to do the same Steps we did with the browse Form.

 

Set Font Size to 8

delete unnecessary fields [erftstamp, erfuser and so on]

Set Colors

Define Field size and position

Set Tab Stops [!! Remember Read only!!]

Create Text field "t_master"

 

Powerbuilder will create a default layout which should look like this:

databrowseg

 

Select all fields [Strg+A] and set the Font Size to 8.

Delete all unnecessary fields.

 

 

Adjust Colors

 

Remember that the BEASCOMMON Engine will check the Background Color ?

Input fields need to set the Background Color to "White".

Text and label fields need to set the Background Color to "Transparent"

 

Just select all Fields and set the Background Color to the appropriate Value.

databrowseH

 

The Background of the Forms need to be set to "Button Face"

Use the right Mouse Button somewhere in the Form and use "Properties - General -Color" and set the Background Value to "Button Face"

 

 

Field Formatting:

 

Now we need to format the fields and labels.

 

Labels must be aligned left.

So please select all labels and align them left

databrowseI

 

Please be sure that the Grid Alignment has been set to 4 and Snap to Grid.

[You can check this under Menu "Design - Options - General"]

 

 

Now set the input field height to 48 Points.

Select all input fields and on the right hand side use the tab "Position" and set the size to 48.

 

Please design the fields like the picture below.

 

The BEASCOMMON Engine will take care about the height of all input fields but it will not change the position of them.

databrowseJ

 

 

TAB STOP Order

 

Now we need to check the Tab Stop Order.

databrowseK

 

Merge Form with BEASCOMMON

Insert the Text field "t_master" so BEASCOMMON will recognize this form as an be.as Form

t_master        -> any content but need to be minimal 5 letters e.g. "abcde"

 

 

 

Control Form Size:

For each Edit Form you need to define the size of it.

This will be done by insert a text field called "t_rechtsunten" on the form.

The BEASCOMMON Engine fill set the lower right site at runtime where this text field has been set.

This text field must be set to invisible.

 

databrowseL

 

Remark:

The form will show scroll bars if the size is smaller than what we have defined.

 

Update Properties:

We need to tell the form how it should update the form.

[ Remark: The PowerBuilder DataWindow will dynamically create SQL Insert Syntax for the insert Statement.

And with these setting you can control how the Generated SQL - Statement will look like.

Please use Menu "Rows - Update Properties".

 

databrowseM

 

Check "Allow Updates"

"Where Clause for Update/Delete" must be set to "Key Columns"

with "Updateable Columns" you define what columns should be updated. e.g. will be used for the SQL - Statement.

"Key Modification" must be set to "Use Update"

"Unique Key Column(s)" will define the Primary Key.. Use the "Primary Key" button if this has not been set.

 

Press the OK button if you are done

 

 

help-achtungWhenever you change the SQL-Statement for this Form ( Datawindow ) via SQL-Painter than you need to set the Update Properties again.

 

 

 

Save Form:

Again we need to save this form into a ".psr" File.

Please use "save as" for it.

Each Edit from need to be have "edit" in the name.

So use the name "mycolor_edit.psr"

 

Finally we are done with this step.