SetSQLSelect  SetText

Chapter 9: Methods for the DataWindow Control

SetTabOrder

Description

Changes the tab sequence number of a column in a DataWindow control to the specified value.

Syntax

integer dwcontrol.SetTabOrder ( integer column, integer tabnumber )
integer dwcontrol.SetTabOrder ( string column, integer 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

Returns the previous tab value of the column if it succeeds and -1 if an error occurs. If any argument’s value is NULL, the method returns NULL.

Usage

You can change a column in a DataWindow object to read-only by changing the tab sequence number of the column to 0.

Examples

Example 1

This statement changes column 4 of dw_Employee to read-only:

dw_Employee.SetTabOrder(4, 0)

Example 2

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)





Copyright © 2004. Sybase Inc. All rights reserved. SetText

View this book as PDF