Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RTF ActiveX Control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00778361
Message ID:
00778822
Views:
37
The LASTKEY() is unrelaible in this case because it isn't affected by mouse action. If user tabs into RTF control and than clicks on some other control with mouse, LASTKEY()=9 will be true eventhogh user didn't press TAB inside RTF control.

>Try to add in the RTF.LostFocus event:
>IF LASTKEY()=9
>	NODEFAULT
>	WITH thisform.Olecontrol2  &&must be full name, 'this' does not work
>		keyboard " "       &&any code to replace lastkey pressed
>		.text=.text+SPACE(4)
>		.selstart=LEN(.text)
>	endwith
>ELSE
>	DODEFAULT()
>endif
>>I am using this control in an application and it seems that one can not use the TAB key to indent the text with this control. As soon as the Tab key is pressed, the focus of the program is set to the next object on the form.
>>This is a little frustrating, because most users instinctively use the TAB key for indentation.
>>
>>Is there a way of avoiding this changing of the focus when using the TAB key?
>>
>>Armando
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform