Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Control Does not show?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Why Control Does not show?
Miscellaneous
Thread ID:
01163697
Message ID:
01163697
Views:
50
I'm redesining my "ErrorProvider" class to allow multiple error objects to be shown and the same time. Basically I create an array of objects and every time the Raiseerror method is called I add an error object to the array and set some properties based on parameters passed to the method to allow for a proper positioning on the form. However, even when the code doesn't fire any error message the object does not show.

This is the code in my RaiseError Method:
		LPARAMETERS oObjeto,cMensaje,iSeverity,lLeft
		**** Parametros 
		*--- oObjeto    - Objeto que se esta validando
		*--- cMensaje   - Mensaje de error a desplegarse en el tooltip
		*--- iSeverity  - Severidad del mensaje (1- Error, 2- Advertencia, 3- Pregunta ?)
		*--- lLeft      - Verdadero si el icono se va a posicionar a la izquierda del control que lo está llamando
		*---
		* Imitando el control ErrorProvider de .NET
		*---
		* Resembles the .NET ErrorProvider Control
		*---
		* Por Enmanuel Gómez B.
		* Version Original Feb 4, 2005
		* 2da Version : Oct. 19, 2006
		*---

		*--- Siempre añado un Elemento al Arreglo de objetos
		LOCAL nElements 
		IF !PEMSTATUS(Thisform,"msgObjetos",5)
			Thisform.AddProperty("msgObjetos(1)")
		ENDIF 
		nElements = ALEN(Thisform.msgObjetos)
	
		DIMENSION Thisform.msgObjetos[nElements+1] As Object 
		
		*--- Creo el objeto que mostrará el mensaje de error
			Thisform.msgObjetos[nElements]=CREATEOBJECT("image")
			
			WITH Thisform.msgObjetos[nElements]
				*--- Posicion del Objeto
				IF !lLeft
					.Left= oObjeto.Left+oObjeto.Width
				ELSE
					.Left=oObjeto.Left-(.Width+3)
				ENDIF 
				.Top=oObjeto.Top
				.ToolTipText=cMensaje
				
				*--- Mensaje de error
				.ToolTipText=cMensaje

				*--- Severidad
				DO CASE 
					CASE iSeverity=1
						.Picture=This.Image1.Picture 
					CASE iSeverity=2
						.Picture=This.Image2.Picture 
					CASE iSeverity=3
						.Picture=This.Image3.Picture 
				ENDCASE  

				*---
				.Visible=.t.

			ENDWITH 
Can anybody tell me what am I missing here?

TIA,

Enmanuel
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Next
Reply
Map
View

Click here to load this message in the networking platform