Set font of ControlDecoration tooltip [message #1576603] |
Wed, 21 January 2015 12:07 |
Simon Laffoy Messages: 19 Registered: January 2015 |
Junior Member |
|
|
Hi,
I am trying to set the font of a ControlDecoration's tooltip to the dialog font, so that it resizes automatically if the user changes the font size. So far I have not been able to see how to access the tooltip to apply the dialog font to it.
For a non decoration tooltip I can instantiate the tooltip myself and set it's font, but I cannot see how to extract the tooltip from a ControlDecoration
This is the code that I have at the moment
public void setDecoration(String myMessage, String myTooltipType) {
ControlDecoration controlDecoration = new ControlDecoration(myControl, myStyle);
controlDecoration.setDescriptionText(myMessage);
FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(myTooltipType);
controlDecoration.setImage(fieldDecoration.getImage());
}
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03424 seconds