Properties

beasscript-logo-small

 

<tabobject>=debug=true/false

activate debug mode

<tabobject>=add=<tab name>=<text>

Add a rider.
tabname=name of the rider.

text=Labeling of a rider. There is no automatic translation

 

Example

<tabobject>=reset

Reset all riders

<tabobject>=name=<tab name>=<newtext>

<tabobject>=losefocus=<name>=<script>

Losefocus-Script. If the rider loses its focus, the script defined here is executed.

Also, various events can alternatively be used.

The script deposited so has a low priority.

If false is given back or the value is set to -1, no TAB change is carried out.

<tabobject>=getfocus=<name>=<script>

Getfocus-Script. The here defined script is run when the rider gets its focus. Alternatively, various events can also be used.

<tabobject>=refdw=<tabname>=dw_x

<tabobject>=refrtf=<tabname>=<column>

Standard text field, associated with the specified field name.

<tabobject>=redraw

Screen rebuild

<tabobject>=dw=dw_x

Determines in which DataWindow (1 .6) the object is visualized.

<tabobject>=x,y,width,height

Position and size. 0-0 = upper left corner of the selected object.

<tabobject>=xscript,yscript,widthscript,heightscript

Dynamic position and size. If these properties are set, the coordinates are automatically calculated after a resize, e.g. automatic fixation on the right side.

etab=widthscript=%sub(<window.width>,2500)

Up to beas2008-0-13: use "max"

etab.widthscript=max

etab_heightscript=max

<tabobject>=color=<rgb:r:g:b>

set the font color

For more info see RGB.

Example: Red text in Tab "page1"

etab=color=page1=<rgb:192:0:0>

<tabobject>=visible=<tabname>=<script>

Script for visible control. Return false / true sets the visibility.

Multi-line script: line feed indicates with <cr_lf>

etab=visible=firsttab=if <myvalue> = 1 then<cr_lf>return true<cr_lf>end if<cr_lf>return false

<tabobject>=setcurrenttab=name

Changes to the defined tabs. Name = name of the tab (not the title). Can also be the number.

<tabobject>=setunvisible

Destroy all objects, but do not destroy the object.

Now redraw with "redraw"

to disable and make the object invisible:

tb=enable=false

tb=setunvisible

<tabobject>=buttonadd=tabname=buttonname=text=command

Adds a button to the specified tab .

tabname=Name of the tab

buttoname=Name of the button

text=Caption of the button

command=Command which will be executed automatically. It can also be used the events.

<tabobject>=preupdate

Start preupdate-Event for the current tab

<tabobject>=update

Start update-Event for the current tab

<tabobject>=buttonreset

All button settings are reset.

<tabobject>=addarea=<tabname>=<object>

An area which is encircled from the mentioned object.

<tabobject>=addobject=<tabname>=<objectname>=x,y,width,height

addobject=<tabname>=<objectname>=nextlinefrom=<objectname>

Object name (eg a field) to add to tabulator

As width / height may also be used 9999 . It is always fit accordingly.

 

with "nextlinefrom=fromobjectname" the field has the same x, width and height as the "fromobjectname" and y = y from the "fromobjectname" + 64.

 

if you want to create a text field and right column, create first the column and then the text field. Only in this way you have an underlined text field.

etab=addnewobject=fbatch=myfield=column=userfield1=nextlinefrom=setscrap

etab=addnewobject=fbatch=myfield_t=text=hello=nextlinefrom=setscrap_t

etab=redraw

 

<tabobject>=addnewobject=<tabname>=<objectname>=<columntyp>=<propertie>=<nextlinefrom/x,y,width,height>

<tabobject>=object=<tabname>=<objectname>=<propertie>=<value>

A property of a defined object can be set. This is only  drawn accordingly after a redraw.

Property:

width, height, x, y, protect, visible

Example: set item itemcode in area stamm to protect

etab=object=stamm=itemcode=protect=1

etab=object=stamm=description=height=500

<tabobject>=udf=<tabname>=<udfname>

Sets the visibility and name of the 4-UDF fields (udfname1-4) to the specified tab.

<tabobject>=debugobjectlist

List all objects in the debug-window

<tabobject>=draw1tab=true

Normally Beas does not draw the tab if there is only one tab.

if you set this parameter, Beas always draws the tab.

 

 

Variables (up to beas2008-0-13)

<objectname.x>

x-coordinate

<objectname.y>

y-coordinate

<objectname.width>

width

<objectname.height>

height

<objectname.clientx>

x-coordinate from the client-area

<objectname.clienty>

y-coordinate from the client-area

<objectname.clientwidth>

width from the client-area

<objectname.clientheight>

height from the client-area

<objectname.currenttab>

Number of current Tab

<objectname.currenttabname>

Name of current Tab

 

 

Userevents

windowevent tabfirstredraw objectname

First redraw

windowevent tabredraw objectname

execute bevor redraw the tab

 

Example:

youtube Insert UDF 5 in Routing Position

(you need beas 9.2 PL: 03)

 

Example:

Create Dropdown-Field in Routing-Position in first Tab after the "Number of payslips"-Field

windowevent postopen

etab=addnewobject=stamm=bomfield=dropdown=userfield1=nextlinefrom=anzls

etab=addnewobject=stamm=bomfield_t=text=bom - Position=nextlinefrom=anzls_t

item.bomfield.dropdown.select pos_id,art1_id from beas_stl where itemcode = '<itemcode>'

end event

 

Example:

New tab in the calculation menu (Tabobject = etab, Datawindow=dw_2, sub-Tab=fbatch)

You need the event: postevent, because the datawindow is create after open-Event!

windowevent postopen

etab=addobject=fbatch=myfield=1500,100,300,60

etab=add=mytab=my tab

etab=addobject=mytab=myfield_t=40=240=605=60

etab=addobject=mytab=myfield=610=240=290=60

end event

 

Example

Add Tabsheet in the item-Window with 2 new fieds

 

windowevent postopen

etab=add=tab01=Onglet

etab=addnewobject=tab01=itemcode1=column=userfield1=320=90=370=60

etab=addnewobject=tab01=itemcode1_t=text=Code=20=90=300=60

etab=addnewobject=tab01=description1=column=userfield2=nextlinefrom=code

etab=addnewobject=tab01=description1_t=text=Description=nextlinefrom=code_t

 

sql=select itemcode, itemname from oitm where itemcode=N'<itemcode>'

item.itemcode1.value=<wert1>

item.description1.value=<wert2>

end event

 

Example

Set the Item-Comments in the first page too:

 

windowevent postopen

// First set column to "stamm"-page

etab=addobject=stamm=usertext=30=860=1480=600

end event

windowevent etab_getfocus_usertext

// if tab "usertext" then set the column to this page

etab=addobject=usertext=usertext=20=00=10000=480

end event

windowevent etab_getfocus_stamm

// if tab "stamm" then set the column to this page

etab=addobject=stamm=usertext=30=860=1480=600

end event

 

Example

Rename tab "General" into Item master data form

 

windowevent postopen

 etab=name=stamm=General modified name

end event

 

Example

Rename ltab "Foreign language" located into "Remarks" tab of Item master data form

 

windowevent tabfirstredraw ltab

 ltab=name=nflangbez=hello world

end event