Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Force Scroll Bars in Edit Box to 'end' of control
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00810669
Message ID:
00810719
Views:
17
>>I am using a read only edit box in VFP 7 to display the changing status of some processing.
>>Basically, I am updating a memo field in a cursor that is the source and then refreshing the edit box.
>>When I refresh the edit box, the vertical scroll bar always moves to the top of the control. A keyboard of CTRL+END in the refresh does not move the scroll bar down.
>>As a result, the oldest part of the status is displayed on the form instead of the newest.
>>Is there a way to move the scroll bar down?
>>Am I using the wrong control?
>>
>>TIA.
>
>Try this in the refresh
>
>  FUNCTION Refresh
>    DODEFAULT()
>    THIS.SelStart = LEN(THIS.Value)
>    NODEFAULT
>    THIS.SetFocus()
>  ENDFUNC
>
>
>You will have to know where to reset the control back because the edit box needs focus to move to the end but after the setfocus() you could Setfocus to another control if you wanted.

Chuck,

That fixed the problem.
Thanks very much.
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Previous
Reply
Map
View

Click here to load this message in the networking platform