Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolling Forms
Message
From
12/05/1998 14:02:29
 
 
To
12/05/1998 13:39:56
Raymond Humphrys
Michigan Department of Community Health
Bath, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00096636
Message ID:
00098817
Views:
37
>>>What did you put?
>>>
>>>ray
>>
>>Each menu option consists of a container with a checkbox, label and shape...
>>
>>The container has a custom method called "selectme" as follows:
>>-------------------------------------------------
>>
>>  PROCEDURE SELECTME
>>    THIS.BACKCOLOR = RGB(0,0,128)
>>    WITH THIS.lblMenu
>>      .FONTBOLD = .T.
>>      .FORECOLOR = RGB(255,255,255)
>>    ENDWITH
>>    * move this option into view if it is off screen
>>    nOptTop    = THIS.TOP + THIS.PARENT.TOP
>>    nOptBottom = THIS.TOP + THIS.HEIGHT + THIS.PARENT.TOP
>>    nScnBottom = THISFORM.HEIGHT   && - SYSMETRIC(9)
>>    * scroll menu up if option is below screen
>>    IF nOptBottom > nScnBottom
>>      THIS.PARENT.TOP = THIS.PARENT.TOP - ( nOptBottom - nScnBottom )
>>      THISFORM.VScrollBar.SetSize()
>>    ELSE
>>      * scroll menu down if option is above screen
>>      IF nOptTop < THISFORM.TOP
>>        THIS.PARENT.TOP = THIS.TOP * -1
>>        THISFORM.VScrollBar.SetSize()
>>      ENDIF
>>    ENDIF
>>
>>-------------------------------------------------
>Menu? What does you form look like? I'm trying to
>use it for a data entry form that is 11x17". Different
>fields laid out in columns down the screen/form. When
>the focus is set to a specific fied new the bottom of the
>screen the form slides up a couple of inches allowing the
>user to see the fields. Do you a field (menu) that moves
>up and down depending on where the item is on the screen?
>
>ray

Yes, it's a scrolling menu screen similar to a tree view control. When all options are open, some may be off the screen. If the user is on the last visible menu option, then presses page down, the newly selected option is brought into view.

The same logic would work for a data entry form. Just put the code that scrolls the form into each controls 'gotfocus' event.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform