Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Third Party Edit Controls
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00114803
Message ID:
00115115
Vues:
17
>Hey all,
>
>Does anybody know of a good third party edit control? I've been
>fighting with VFP's edit box and problems in the SelText and
>UnDo buffers, which still didn't get fixed in even VFP 6.0.
>Bottom line it's unreliable.
>
>I tried using the RichText control, but it too has problems with
>VPF especially when pasting text with control characters inside of
>it (they show up as extended characters - boxes).
>
>Anybody have any experience with third party Edit ActiveX controls?
>
>What I need is:
>
>* Fully functional SelText or equivalent functionality.
>
>* Multi-Step undo buffer
>
>* Ability to toggle wrapping modes
>
>Basically, the FoxPro editor as a control. I'm kind of running out of
>ideas here...
>
>+++ Rick ---



Agree! Currently even set the SelectOnEntry Property to .T.
when Click, it still NOT Selected!!

So, I use coding control:
* Textbox1.gotfocus
This.selstart = 0
This.sellength = Len(This.value)
** THis version is for Char only!
** For number, someone suggest use KeyBoard '{CTRL+A}'
** but if not fully get focus, other control will fully selected! ~_~'

* Textbox1.Click
THis.GotFocus

* Proper Case from Lotus User request!
* UpCaption()
* Change the line into Proper Case
* Usage:		Rline = UpCaption(LLINE)
* FUNCTION UPCAPTION
LPARAMETERS PLINE

LLINE = ALLTRIM(LOWER(STRTRAN(PLINE,'	',' ')))
LLEN = LEN(LLINE)
RLINE = ""

IF LLEN>1
	RLINE = UPPER(LEFT(LLINE,1))		&& TAKE 1ST CHAR
	LLINE = SUBSTR(LLINE,2)			&& LLINE REMAIN

	DO WHILE !EMPTY(LLINE)	.AND. LEN(LLINE) > 1
		LASTCHAR = RIGHT(RLINE,1)		&& LASTCHAR OF RLINE
		THISCHAR = LEFT(LLINE,1)		&& 1STCHAR OF LLINE
		DO CASE
		CASE EMPTY(THISCHAR)	&& UPPERFLAG .T.
			RLINE = ALLTRIM(RLINE) + " "

		CASE LASTCHAR $ '+"/}])([{\-.,;!' .OR. EMPTY(LASTCHAR)	&& UPPER CASE
			RLINE = ALLTRIM(RLINE + UPPER(THISCHAR))
			
		OTHERWISE	&& MIDDLE
			RLINE = ALLTRIM(RLINE + LOWER(THISCHAR))
		ENDCASE

*		LLINE = RIGHT(LLINE,LLEN-1)
		LLINE = SUBSTR(LLINE,2)
	ENDDO

	LASTCHAR = RIGHT(RLINE,1)		&& LASTCHAR OF RLINE
	THISCHAR = LEFT(LLINE,1)		&& 1STCHAR OF LLINE
	DO CASE
	CASE EMPTY(THISCHAR)	&& UPPERFLAG .T.
		RLINE = ALLTRIM(RLINE) + " "

	CASE LASTCHAR $ '+"/}])([{\-.,;!' .OR. EMPTY(LASTCHAR)	&& UPPER CASE
		RLINE = ALLTRIM(RLINE + UPPER(THISCHAR))
		
	OTHERWISE	&& MIDDLE
		RLINE = ALLTRIM(RLINE + LOWER(THISCHAR))
	ENDCASE

	RLINE = ALLTRIM(RLINE)

	RETURN RLINE
ELSE
	RETURN ""
ENDIF
But I got problem if user really want UNDO the change case action....

So, I can ONLY Undo One Time by:
assign _cliptext to certain value
Select the control
Paste by KeyBoard '{CTRL+V}'

Thus, Undo is availble at Popup Menu!!
but I still think is a poor work!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform