10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table Field OperationsWhen you use the SetInputFocus method, the change in focus occurs at theend of the current event block. The method triggers any appropriate Exit,SetValue, and Entry events. For example, the following event block accepts anumber as input from the user and then scrolls the table field display to thatrow:declareresp = varchar(80);...on click menu_button.ChangeRow =beginresp = prompt 'Enter the number of the row '+'you want to see.';status = field(custtable).SetInputFocus(row =int4(resp));...end;When you use the SetInputFocus method to specify a column, the columnname must be quoted or contained in a varchar variable.How You Can Use the ActiveRow Attribute to ScrollThe ActiveRow attribute identifies the array row that has the current inputfocus. If you set this attribute directly, OpenROAD scrolls the data display tothe specified row, moves the input focus to the first Landable field in that row,and sets the CurRow attribute to the same specified number.Setting ActiveRow attribute has no immediate effect. Instead, an internalevent is queued that ultimately generates any necessary SetValue and Exitevents as the focus attempts to move. To prevent getting incorrect results,therefore, do not set the ActiveRow attribute in an event block and thenattempt to use its value in the same event block.How You Can Scroll Indirectly with the Find MethodYou can use the Find method of the ArrayObject class to find the row you wantto scroll to, followed by setting ActiveRow to that row to do the actualscrolling.Horizontal Scroll BarsWhen the ColumnsDisplayed attribute of a vertical table field is smaller thanthe total number of columns, the table field may have a horizontal scroll bar.You can enable the horizontal scroll bar by setting the HasHorizontalScrollBarattribute to TRUE.240 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!