Summary: | [CLabel] Custom behaviour when the whole text of a CLabel cannot be displayed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Michal Tkacz <Michal.Tkacz> | ||||
Component: | SWT | Assignee: | Duong Nguyen <duongn> | ||||
Status: | NEW --- | QA Contact: | |||||
Severity: | enhancement | ||||||
Priority: | P3 | CC: | steve_northover | ||||
Version: | 3.1 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Michal Tkacz
2005-05-23 10:30:21 EDT
Created attachment 21956 [details]
Patch proposal
In fact much simpler solution would probably be to extract some of the code
into a protected method that could then be overriden. Here is a patch proposal.
It defines a new method internalSetToolTipText() that gets two parameters:
label's text if it's not completely visible (null otherwise) and tooltip text
set by the application. This method is then called instead of
super.setTooltipText(). My implementation would then look like this:
class MyCLabel extends CLabel {
protected void internalSetToolTipText(String text, String appToolTipText) {
String string = appToolTipText != null ? appToolTipText;
// display string using custom tooltip
}
}
This is how this method is implemented in CLabel, the only difference is that
it uses system tooltip.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. |