PDA

View Full Version : display help icon next to button



marc123
29 Aug 2012, 4:48 AM
Hello,

I have a button and I want to position a help icon /w helptext (to show on mouseOver) next to it but a Ext.button has no configoption "helptext". An element of type 'compositefield' allows me to do this but when adding the button to it's item array I only see the button, no helptext:



items : [{
xtype: 'compositefield',
labelSeparator: ':',
defaultMargins: '0px 10px 10px 0px',
skipLastItemMargin: false,
width: 200,
name: 'Upload file',
defaults: {
fieldLabel: ':',
labelSeparator: ' ',
height: 24
},
helpText: 'My helptext here',
fieldLabel: 'Upload file',
items: [{
xtype : 'button',
text : 'Upload file',
id : 'fileUploadButton',
iconCls : 'icon-upload',
height : 30,
style : {margin:'5px 10px 10px 10px'},
handler : function(){
if (!application.window.uploadFile){
application.window.uploadFile= new Ext.Window(application.configObject.uploadFile);
}
application.window.uploadFile.show();
}
}]
},{


Do I have to modify this code or use another Ext element to create a helpicon next to a button?

redraid
29 Aug 2012, 4:56 AM
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.button.Button-cfg-tooltip

marc123
29 Aug 2012, 5:29 AM
A tooltip is not what I mean with 'helpIcon'.

redraid
29 Aug 2012, 5:40 AM
You want mouse cursor with help icon?

marc123
29 Aug 2012, 7:03 AM
Hello,

I need an icon of a circle with a question mark in it:http://193.78.83.222:8300/mbakk/hms_denhelder_client/develop/application/images/icons/question.png
If the mouse hovers over this icon, a balloon with a helptext appears from this circle. The icon should be positioned to the right of the button.

scottmartin
5 Sep 2012, 8:56 AM
Here is an example of icon tips for a label:
http://pezo.net/extjs/input_tooltip/

You can see the thread:
http://www.sencha.com/forum/showthread.php?19301

Scott.