Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrolling through a typed text ?
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01435706
Message ID:
01435716
Vues:
36
This is the closest example i can find that i can work with. My only block right now is getting
my text (sampletext.txt) into the editbox. How would i substiute this text for the one contained in
he example below. I would prefer a type sampletext.txt into the display screen if that is possible.
Any help would be appreciated.

k

LOCAL oFrm

oFrm= CREATEOBJECT("TestForm")
TEXT TO oFrm.Edit1.Value NOSHOW PRETEXT 1 + 2
The problem displayed here is to do with
using the mouse wheel to scroll the edit
box. When the edit box has focus and the
edit box is scrolled, any attempt to
select text with the mouse will work
as expected. However, when the edit box
does not have focus and the edit box is
scrolled, any attempt to select text with
the mouse will jump the box back to its
original position. The selection doesn't
begin where you would expect.

This drives my users crazy. In all their
other applications (eg MS Outlook) this
works as expected. However in our VFP
application it jumps around in a very
illogical fashion.
ENDTEXT

oFrm.Show(1)

************************************
DEFINE CLASS TestForm AS Form
ADD OBJECT Text1 AS TextBox WITH ;
Height= 37, ;
Left= 36, ;
TabIndex= 1, ;
Top= 12, ;
Width= 289

ADD OBJECT Edit1 AS EditBox WITH ;
Height= 109, ;
Left= 36, ;
ReadOnly= .t., ;
TabIndex= 2, ;
Top= 84, ;
Width= 289, ;
Value= ""
ENDDEFINE


Public Event MouseWheel As MouseWheelEventHandler


PROCEDURE Object.MouseWheel
LPARAMETERS nDirection, nShift, nXCoord, nYCoord

PROCEDURE edit1.MouseWheel
LPARAMETERS nDirection, nShift, nXCoord, nYCoord
* Set focus to this control
If Type("thisform.ActiveControl") # "O" or thisform.ActiveControl < > this
this.SetFocus
EndIf
ENDPROC


oFrm.hide(1)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform