Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Set font of ControlDecoration tooltip(Is it possible to set the font of the ControlDecoration tooltip?)
Set font of ControlDecoration tooltip [message #1576603] Wed, 21 January 2015 12:07
Simon Laffoy is currently offline Simon LaffoyFriend
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
Previous Topic:challenge: Setting with of last table column
Next Topic:[JFace] Image of ControlDecoration is visible outside composite when the scrolling a composite
Goto Forum:
  


Current Time: Thu Apr 25 19:27:01 GMT 2024

Powered by FUDForum. Page generated in 0.03206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top