Foro

textfield con un tooltip que a su vez contiene imagen

0
Alqguien sabe coomo añadir a un campo textfield un tootip para mostrar una imagen? gracias <!-- s;) --><!-- s;) -->.
0
Hola, prueba con la función Ext.QuickTips.register, para registrar un tooltip en el textfield. Acá un ejemplo de como hacerlo:
var formulario = new Ext.form.FormPanel({
		title: 'Mi Formulario' ,
		width: 400,
		height : 400,
		defaultType: 'textfield',
		items:[{
			name: 'txt1',			
			fieldLabel: 'Label 1',
			width: 200	
		}]
	});
	var ventana =  new Ext.Window({
		title: 'mi ventana',
		width: 400,
		height : 400,
		items:formulario		
	});		
		
	Ext.onReady(function(){
		Ext.QuickTips.init();
		var cajaTexto = formulario.items.items[0];
		Ext.QuickTips.register({ 
			target: cajaTexto
			,text:'<img src="user.gif"/>'
		});
		ventana.show();			
	})
En teoría el text:'<img src="user.gif"/>' puedes cambiarlo por un text:'<span class="clsImagen"></span>' para que lo manejes desde un CSS. Saludos.
0
funcionó!! gracias <!-- s;) --><!-- s;) -->

¿Conoces a alguien que pueda responder esta pregunta? Comparte el link en Twitter o Facebook

Es necesario registrarse para poder participar en el foro! Si ya tienes una cuenta puedes entrar y comentar en este foro.