« Tooltips » : différence entre les versions
Aller à la navigation
Aller à la recherche
(Page créée avec « TBW ... Return to the introduction ↑ Go to the next page → ») |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
<font color=#556B2F>'''GENIUS'''</font> proposes very simply the possibility to add tooltips using the setToolTipText method ... | |||
<syntaxhighlight lang="java"> | |||
GEntryInt valI = new GEntryInt("Integer :", 123); | |||
valI.setToolTipText("This is an integer"); | |||
</syntaxhighlight> | |||
[[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: | |||
<syntaxhighlight lang="java"> | |||
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); | |||
</syntaxhighlight> | |||
[[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 →]] |
Version du 5 mai 2017 à 12:02
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");
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);