Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behaviour from RightClick()
Message
From
10/07/2002 06:17:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Strange behaviour from RightClick()
Miscellaneous
Thread ID:
00676977
Message ID:
00676977
Views:
55
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
Next
Reply
Map
View

Click here to load this message in the networking platform