When characters are typed in the B4XTable search box and they make a match in any given column data, normally the color of those characters display with a different color, but for some of my apps, the color does not change in the column data. I tried changing the placement of a Sleep(0) in the code, but that did not help. I thought, perhaps a theme color , but not so.
Thank you
B4XTable is a paged based table. The UI is made of a horizontal xCLV. The data is stored in an in-memory SQLite database. How to use? 1. Add a B4XTable with the designer. 2. Add the columns: B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS) B4XTable1.AddColumn("Name"...
The highlight defaults to TRUE by default, but I have inserted that line anyway and it did not seem to make a difference. The highlight does not change color, although it filters. I even put it in many places in the code to see if it matters, but no change. I even added a line to it.
B4X:
B4XTable1.HighlightSearchResults = True
B4XTable1.HighlightTextColor=xui.Color_Blue 'added this line and it makes no difference
My project is a B4A project with B4Xpages. I removed all the xSelections features like commenting these 2 lines, then the highlight color started working again. It still filters, but the highlight color does not change.:
B4XTableSelections extends B4XTable and adds new selection modes: SINGLE_CELL_TEMP - this is the built-in selection mode. Unlike the other selection modes it disappears automatically. SINGLE_CELL_PERMANENT - selection of a single cell. SINGLE_LINE_PERMANENT - selection of a single line...
Here is a project attached that demonstrates the behavior in B4A. Try to search, you will see that the highlight color does not change. However, if you comment all the lines pertinent to xSelections, it works.
Search highlighting is disabled automatically based on the selected mode.
You can disable by making this change:
B4X:
Public Sub setMode (m As Int)
mCurrentMode = m
SelectedLines.Clear
If mCurrentMode = MODE_SINGLE_CELL_TEMP Then
mTable.SelectionColor = SelectionColor
mTable.HighlightSearchResults = True
Else
mTable.SelectionColor = xui.Color_Transparent
mTable.HighlightSearchResults = Not(xui.IsB4J) '<----- line 107 in B4XTableSelections
End If
I haven't tested it enough so not ready to update the library.
Sorry. It does not work. It does not highlight the selection. I can live without it. You are too busy for something which is not essential like this. Please note that it does not work either in your B4J example I made reference to in post #4 if you use for instance: XSelections.MODE_SINGLE_LINE_PERMANENT
I wasn't clear. Search highlighting is disabled by default because of technical reasons in B4J. You can enable it on B4A and B4i with the suggested change
No. Search highlighting does not work in B4A even with the change you instructed me to make. Try it in my example after you implement the change you made in the class and test for yourself after you choose: XSelections.MODE_SINGLE_LINE_PERMANENT
Looking at the xSelections class module change you made by commenting the below code to make it work, but now the problem is: the selection color blinks and disappears and does not stay on and the text color is barely visible on when you choose: XSelections.MODE_SINGLE_LINE_PERMANENT
B4X:
If mCurrentMode = MODE_SINGLE_CELL_TEMP Then
mTable.SelectionColor = SelectionColor
mTable.HighlightSearchResults = True
Else
mTable.SelectionColor = xui.Color_Transparent
mTable.HighlightSearchResults = False
End If