Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox.Controlsource + check for changes
Message
De
26/02/2003 13:11:46
 
 
À
26/02/2003 11:21:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00758093
Message ID:
00758277
Vues:
30
Hi José,
>>
>>>I need to know when the data in a TextBox change.
>>>
>No, Interactive method don´t run, TRY THAT.

>
Your code doesn´t create a program./interactivechange for your textbox control !

It creates those methods for the form instead of the textbox.. This is the reason that all the deal is not working.. Try something as:
PUBLIC otabform1

SET CLASSLIB TO f:\d\ds\comun\cls\tabclass.vcx ADDITIVE

CREATE TABLE TITAS26 (ctitas c(2), titas c(40))
INSERT INTO TITAS26 (CTITAS, TITAS) VALUES ("c1","DESC C1")
INSERT INTO TITAS26 (CTITAS, TITAS) VALUES ("c2","DESC C2")
INSERT INTO TITAS26 (CTITAS, TITAS) VALUES ("c3","DESC C3")
GO TOP

otabform1=NEWOBJECT("tabform1")
otabform1.Show

RETURN
**************************************************
*-- Form:         tabform1 (c:\form1.scx)
*-- ParentClass:
*-- BaseClass:    form
*-- Marca de hora:   02/26/03 05:11:14 PM
*
DEFINE CLASS tabform1 AS form
	DoCreate = .T.
	Name = "Tabform1"
	ADD OBJECT txtctitas AS textboxX WITH ;
		ControlSource = "titas26.ctitas", ;
		Height = 23, ;
		Left = 213, ;
		MaxLength = 2, ;
		TabIndex = 2, ;
		Top = 99, ;
		Width = 38, ;
		Name = "txtCtitas"
	ADD OBJECT txttitas AS textboxX WITH ;
		ControlSource = "titas26.titas", ;
		Height = 23, ;
		Left = 211, ;
		MaxLength = 40, ;
		TabIndex = 4, ;
		Top = 140, ;
		Width = 288, ;
		Name = "txtTitas"
ENDDEFINE
DEFINE CLASS textboxX AS textbox
		Comment = ""
	PROCEDURE txttitas.ProgrammaticChange
		WAIT WINDOW "HOLA"
	ENDPROC
	PROCEDURE txttitas.InteractiveChange
		WAIT WINDOW "HOLA"
	ENDPROC
	PROCEDURE command1.Click
		SELECT TITAS26
		SKIP
		THISFORM.Refresh()
	ENDPROC
ENDDEFINE
It certainly will solve the problem..

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform