OpenRoad scrolling

Subject: openroad-users Using Table Fields in OR
Author:  oscar (oscar@integra.com.py) at internet
Date:    05/06/1999 13:59


Hi there!!!
     
About using table fields in OR 4.0:
     
By default the tablefields have and vertical scroll bar to go thru the rows. I 
need to use horizontal scrollbar. I know this is useful with viewport composite
fields and it works, but only using the scroll bar with the mouse. I need that
the horizontal scroll bar works when I moving thru the columnfields with
the cursor. How Can I reach this?
     
Thanks in Advance.
     
     _________________________________


     If you create an entry in the ChildEntry of your tablefield (which 
     should be contained within a ViewPortField) like:
     
        CALLPROC pr_scroll_viewport(
                tf_template = tf_template,
                vf_template = byref(vf_template),
                v_column = CurFrame.TriggerField.Name
                );
     
     
     Where pr_scroll_Viewport can be procedure held seperately to the frame 
     :
     
     /************************************************************************
     **
     **      Name            pr_scroll_viewport
     **
     **      Description     Scroll a viewport depending on the column to be
     **                      displayed of a tablefield held within it.
     ************************************************************************/
     
     PROCEDURE pr_scroll_viewport(
             tf_template = TableField,
             vf_template = ViewportField,
     
             v_column    = varchar(32) not null,
     ) =
     DECLARE
             i_rowno     = integer not null,
     ENDDECLARE
     BEGIN
             FOR i_rowno = 1 to tf_template.TableBody.ChildFields.LastRow DO
                     IF tf_template.TableBody.ChildFields[i_rowno].Name = 
                        v_column THEN
                             ENDLOOP;
                     ENDIF;
             ENDFOR;
             IF  tf_template.TableBody.ChildFields[i_rowno].AbsXLeft < 0
             OR  tf_template.TableBody.ChildFields[i_rowno].AbsXRight > 
                vf_template.AbsXRight THEN
                     vf_template.XOffSet = 
                               tf_template.TableBody.ChildFields[i_rowno].XLeft;
                     vf_template.UpdField();
             ENDIF;
     END
     
     ______________________________ Reply Separator 
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William