Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange behaviour from RightClick()
Message
De
10/07/2002 06:17:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Strange behaviour from RightClick()
Divers
Thread ID:
00676977
Message ID:
00676977
Vues:
57
Hi

I have code in my Textbox class in the right-click event:
PUBLIC goControl, gcText
goControl = this

DEFINE POPUP shortcut shortcut RELATIVE FROM MROW(),MCOL()
DEFINE BAR _MED_CUT OF shortcut PROMPT ttt_cmdcut
DEFINE BAR _MED_COPY OF shortcut PROMPT ttt_cmdcopy
DEFINE BAR _MED_PASTE OF shortcut PROMPT ttt_cmdpaste
DEFINE BAR 4 OF Shortcut PROMPT "\-"

*Check if auto-formatting turned on
IF this.lProper
	DEFINE BAR 5 OF Shortcut PROMPT "Automatic Casing"
	SET MARK OF BAR 5 OF Shortcut TO .T.
	ON SELECTION BAR 5 OF Shortcut goControl.lProper = .F.
ELSE
	DEFINE BAR 5 OF Shortcut PROMPT "Automatic Casing"
	SET MARK OF BAR 5 OF Shortcut TO .F.
	ON SELECTION BAR 5 OF Shortcut goControl.lProper = .T.
ENDIF

*If enabled, then allow facility to check spelling
IF this.Enabled AND !this.ReadOnly
	DEFINE BAR 6 OF Shortcut PROMPT "Check Spelling"

	*Check if text has been selected
	gcText = IIF(this.SelLength > 0 , this.SelText, this.Value)

	ON SELECTION BAR 6 OF Shortcut goCCMS.CheckSpelling(@gcText)
ENDIF

IF pemstatus(THISFORM,"lUseHook",5)
         IF THISFORM.lusehook
		THISFORM.oneventhook("RightClick",THIS,THISFORM)
	ENDIF
ENDIF
ACTIVATE POPUP shortcut

*Update value
IF this.Enabled AND !this.ReadOnly
	IF this.SelLength > 0
		this.SelText = gcText
	ELSE
		this.Value = gcText
	ENDIF
ENDIF

RELEASE goControl, gcText
What I do is select the SpellCheck from the menu (without highlighting any text so it checks the whole thing) and when the this.Value = gcText line runs, the text comes out with a  on the end.

I've debugged it and checked gcText and the  does not appear in it, this  only appears when assigned to the value of the textbox.

Has anyone else had this problem?

Thanks
Kev
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform