Changes the tab sequence number of a column in a DataWindow control to the specified value.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object |
Web ActiveX |
DataWindow control, DataWindowChild object |
integer dwcontrol.SetTabOrder ( integer column, integer tabnumber ) integer dwcontrol.SetTabOrder ( string column, integer tabnumber )
number dwcontrol.SetTabOrder ( number column, number tabnumber ) number dwcontrol.SetTabOrder ( string column, number tabnumber )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or child DataWindow in which you want to define the tab order. |
column |
The column to which you are assigning a tab value. Column can be a column number or a column name. The column number is the number of the column as it is listed in the Column Specification view of the DataWindow painter—not necessarily the number of the column in the Design view. |
tabnumber |
The tab sequence number (0 - 9999) you want to assign to the DataWindow column. 0 removes the column from the tab order, which makes it read-only. |
Returns the previous tab value of the column if it succeeds and –1 if an error occurs. If any argument’s value is null, in PowerBuilder and JavaScript the method returns null.
You can change a column in a DataWindow object to read-only by changing the tab sequence number of the column to 0.
This statement changes column 4 of dw_Employee to read-only:
dw_Employee.SetTabOrder(4, 0)
These statements change column 4 of dw_employee to read-only and later restore the column to its original tab value with read/write status:
integer OldTabNum
// Set OldTabNum to the previous tab order value
OldTabNum = dw_employee.SetTabOrder(4, 0)
... // Some processing
// Return column 4 to its previous tab value.
dw_employee.SetTabOrder(4, OldTabNum)