Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autotext like MS Word? Drag/drop text like Word? 1

Status
Not open for further replies.

Docpro777

Programmer
Joined
Jul 1, 2003
Messages
105
Location
US
1) Word has an autotext function wherein a tool tip may be displayed to click/enter a word/phrase for complex words.

Fox Advisor has an article that demonstrates pop-down 'phrase menus' (good for many); but this is not like Word.

2)Word and VFP Memo fields both allow one to cut/drag/drop text as do VFP . But VFP EDIT BOX fields don't (to the best of my knowledge). Is there not a way to drag/drop text in EDIT BOX's?

Philip M. Traynor, DPM
 
DocPro777

1) Word has an autotext function wherein a tool tip may be displayed to click/enter a word/phrase for complex words.

Fox Advisor has an article that demonstrates pop-down 'phrase menus' (good for many); but this is not like Word.


Was there a question in there somewhere?

2)Word and VFP Memo fields both allow one to cut/drag/drop text as do VFP . But VFP EDIT BOX fields don't (to the best of my knowledge). Is there not a way to drag/drop text in EDIT BOX's?

Editbox has a OLEDragDrop event, a OLEdrag mode, I'm not sure what would make you say "Is there not a way to drag/drop text in EDIT BOX's?" Have you looked at the "Fun with OLE drag drop"? Most of the controls are Editboxes.





Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
1) Word has an autotext function wherein a tool tip may be displayed to click/enter a word/phrase for complex words.

Although with a little work using the tooltip (and in VFp8.0 the multiline tooltip) it is propably possible to replicate the autotext function of Word. Copy the following in a program and run it. Wait until the tooltip show up.

Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	DoCreate = .T.
	ShowTips = .T.
	Caption = "Form1"
	Name = "Form1"
	ADD OBJECT edit1 AS editbox WITH ;
		Height = 181, ;
		Left = 48, ;
		ToolTipText = "", ;
		Top = 24, ;
		Width = 265, ;
		ControlSource = "mycursor2.editb", ;
		Name = "Edit1"
	PROCEDURE Load
		CREATE CURSOR myCursor (word c(50))
		INSERT INTO myCursor (word) VALUES ("Thank you")
		GO top
		CREATE CURSOR mycursor2 (editb m)
		GO bott
		APPEND BLANK
	ENDPROC
	PROCEDURE edit1.Init
		this.ToolTipText = ALLTRIM(myCursor.word)+&quot; <Press Enter>&quot;
	ENDPROC
	PROCEDURE edit1.InteractiveChange
		IF LASTKEY() = 13
		  this.Value = this.Value+ ALLTRIM(myCursor.word)
		ENDIF
	ENDPROC
ENDDEFINE


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top