« Tooltips » : différence entre les versions

De GENIUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
 
Ligne 6 : Ligne 6 :
valI.setToolTipText("This is an integer");
valI.setToolTipText("This is an integer");
</syntaxhighlight>
</syntaxhighlight>


[[File:ToolTip.jpg]]
[[File:ToolTip.jpg]]


Note that it is also possible to manage tooltips for widget list as GComboBox. Here it is very simple too as we can see it on the example below:
Note that it is also possible to manage tooltips for widget list as GComboBox. Here it is very simple too as we can see it on the example below:
Ligne 25 : Ligne 27 :
test.setTooltipsList(infos);
test.setTooltipsList(infos);
</syntaxhighlight>
</syntaxhighlight>


[[File:ToolTipList.jpg]]
[[File:ToolTipList.jpg]]




[[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]]  
[[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]]  
[[Shortcuts|Go to the next page →]]
[[Shortcuts|Go to the next page →]]

Dernière version du 5 mai 2017 à 12:06

GENIUS proposes very simply the possibility to add tooltips using the setToolTipText method ...

GEntryInt  valI = new GEntryInt("Integer :", 123);

valI.setToolTipText("This is an integer");


ToolTip.jpg


Note that it is also possible to manage tooltips for widget list as GComboBox. Here it is very simple too as we can see it on the example below:

String[] list = new String[3];
list[0] = "Choice 0";
list[1] = "Choice 1";
list[2] = "Choice 2";
		
String[] infos = new String[3];
infos[0] = "Information on choice 0";
infos[1] = "Information on choice 1";
infos[2] = "Information on choice 2";
		
GComboBoxWithLabel test = new GComboBoxWithLabel("test:", 0,  list);
test.setTooltipsList(infos);


ToolTipList.jpg


Return to the introduction ↑ Go to the next page →