This may be trivial or not possible at the moment, I don’t know, hence I ask Xojo gurus for help.
The problem: column showing text is narrow because of limited space on the screen, when hovering mouse over the column in selected row it would be nice to see the full text.
If the above is not exactly possible, what would be the workaround to show the full text?
a.You can add a Displayer (TextArea at the window’s bottom/elsewhere in the window) and display the Cell contents there.
b.When the Mouse is Over the Cell and the Option/Alt key ios depressed, display the TextArea with the Cell Contents ?
You could have a tooltip appear when hovering the mouse. I use the MouseMove event of the listbox for this. Something like this:
app.HideTooltip ()
row = me.RowFromXY (x, y)
column = me.ColumnFromXY (x, y)
if (row<0 or column<0) then Return
tipStr = "I will show this text"
app.ShowTooltip (tipStr, System.MouseX+20, system.MouseY+20)
This will show a tip immediately, but I use CallLater to have the tip appear after a couple of seconds.
Tim, is it not for DesktopApplication only?
I need it for Web App.
OK, I see no solution available so far for the WebListBox.
Emile, the PopOver is part of Mobile, not WebApp.
The WebApp I am working on is used on computers, not suitable for phones or even tablets.
Brian, very funny, I was just going to respond to Emilie that I could probably use WebContainer with the ShowPopover method to mimic the tool tip on a cell when I got the notification about your response.
Now the question is how to trigger ShowPopover?
I am looking at the example of WebSDK/WebListBoxCell Renderers - the Button Cell.
I suppose I could us this technique, show the text as button label in the cell, then use the CustomCellAction to do the ShowPopover.
In the sample the Listbox1.Opening method has the comment:
// Custom cells can only be assigned individually
I need it for WebListBox using DataSource though.
In the mentioned SDK example, the ButtonColumns.JavascriptClassCode, line 29, using “mouseover” event name instead of “click” will actually give me what I need, I think.
code.Add " button.addEventListener('mouseover', function(ev) {"
Nothing is easy. I have the popover showing upon the “mouseover” event but there are some issues with that.
Problem 1 - the WebContainer position is relative to the control using WebContainer.DisplaySides… , in this case WebListBox so it is not close to the cell but rather to the Top/Bottom/Left/Right of the WebListBox.
Problem 2 - there is some delay on “mouseover” event - moving mouse between adjacent lines will not hide the WebContainer right away