dima_toxsoft
16 Mar 2009, 1:48 AM
Hi everybody!
Sorry for my English.
Please, give me hint.
This code show tooltip every time mouse over:
public class IncidentCauseToolTipCellRenderer
implements GridCellRenderer<IncidentModel> {
private static IncidentCauseToolTipCellRenderer instance;
public String render( IncidentModel model, String property, ColumnData config,
int rowIndex, int colIndex, ListStore<IncidentModel> store ) {
// get incident status
IncidentModel incidentModel = store.getAt( rowIndex );
String incidentDescription = incidentModel.get( IncidentModel.CAUSE );
String tooltip = incidentDescription;
String html = "<span qtip='" + tooltip + "'>" + incidentDescription + "</span>";
return html;
}
}
But I need show tooltip ONLY when text width don't suite in field.
Thanks in advance.
Sorry for my English.
Please, give me hint.
This code show tooltip every time mouse over:
public class IncidentCauseToolTipCellRenderer
implements GridCellRenderer<IncidentModel> {
private static IncidentCauseToolTipCellRenderer instance;
public String render( IncidentModel model, String property, ColumnData config,
int rowIndex, int colIndex, ListStore<IncidentModel> store ) {
// get incident status
IncidentModel incidentModel = store.getAt( rowIndex );
String incidentDescription = incidentModel.get( IncidentModel.CAUSE );
String tooltip = incidentDescription;
String html = "<span qtip='" + tooltip + "'>" + incidentDescription + "</span>";
return html;
}
}
But I need show tooltip ONLY when text width don't suite in field.
Thanks in advance.