I am populating a weblistbox with a search term from a webtextfield, the first five columns are the returned fields, and they fill cells 0-4. In cell five is the ‘searched field’ I would like to highlight the search term among the returned value, some pseudo code for this below, I only get and added (i would like to use a highlight of a yellow background webstyle but thought I would start with bold on the off-chance it may work straight off). It didn’t LOL
Is it possible, if so how?
ps=instr(0,session.rs.IdxField(i).Value,txtSearch.text) 'gives start of highlight
fronttext=left(session.rs.IdxField(i).Value,ps-1)
backtext=mid(session.rs.IdxField(i).Value,ps+len(txtSearch.text))
disp=fronttext+"<b>"+txtSearch.text+"</b>"+backtext
Listbox1.Cell(Listbox1.LastIndex, i-1 ) = disp