Is it possible to show Tooltips in a ListPicker menu?
This effect is possible using TabView, but I would much prefer using ListPicker.
Below is a simplified version of my code.
ItemList =
{"Apples",
"Oranges",
"Bananas",
"Watermelon"};
ReviewsList =
{"10 Reviews",
"7 Reviews",
"16 Reviews",
"12 Reviews"};
TooltipList =
{"5 Positive, 3 Neutral, 2 Negative",
"4 Positive, 1 Neutral, 2 Negative",
"10 Positive, 2 Neutral, 4 Negative",
"6 Positive, 3 Neutral, 3 Negative"};
CombinedList = Table[Column[
{Style[ItemList[[i]], FontColor -> Purple,
FontFamily -> "Verdana", FontSize -> 12, FontWeight -> Bold],
Tooltip[
Style[ReviewsList[[i]], FontFamily -> "Verdana",
FontSize -> 12], TooltipList[[i]]]}
], {i, 1, 4}];
(* Column *)
Column[CombinedList]
(* TabView *)
TabView[Table[CombinedList[[i]] -> 1, {i, 1, 4}], Dynamic[x],
ControlPlacement -> Left]
(* ListPicker *)
ListPicker[Dynamic[x], CombinedList]
Answer
EDIT
As rasher observes my answer does not answer your direct question. Tooltip wrapper does not appear to work for ListPicker items. I posted this answer in the event it achieves your aim or motivates your own answer. I am not certain what your ultimate aim is.
I have modified your code (esp. avoid uppercase variable names to avoid conflicts with in-bulit functions):
itemList = {"Apples", "Oranges", "Bananas", "Watermelon"};
reviewsList = {"10 Reviews", "7 Reviews", "16 Reviews", "12 Reviews"};
tooltipList = {"5 Positive, 3 Neutral, 2 Negative",
"4 Positive, 1 Neutral, 2 Negative",
"10 Positive, 2 Neutral, 4 Negative",
"6 Positive, 3 Neutral, 3 Negative"};
combinedList =
Table[Tooltip[reviewsList[[i]], tooltipList[[i]],
BaseStyle -> {FontFamily -> "Verdana", FontSize -> 12},
TooltipStyle -> Directive[24, Background -> LightRed]] ->
itemList[[i]], {i, 1, 4}]
Then using list picker:
Row[{ListPicker[Dynamic[x], combinedList,
BaseStyle -> {FontColor -> Purple, FontFamily -> "Verdana",
FontSize -> 12, FontWeight -> Bold}], " ", Dynamic@First@x},
Frame -> True]
yields:

Other answers may address the tooltips in dynamic interactive itemized lists.
Comments
Post a Comment