B4J Question [ABMaterial] Workaround for HTML quote in ABMcombo?

stanmiller

Active Member
Licensed User
Longtime User
I'm looking for a workaround to force a quote to display correctly in ABMCombo.

There appears to be a bug in the ABMCombo.SetActiveItemId() method when items contain quotes. For the most part quotes are displayed correctly by the control. It's only when you specify an item with SetActiveItemId() that the HTML quote shows.

1_abm_quote_escaped_zpsjyap1rhg.jpg



Any ideas?
 

stanmiller

Active Member
Licensed User
Longtime User
B4X:
Dim desc as String
Dim itemID = "0" As String

desc = $"Colonial Beige 1/2""$
comboProduct.AddItem( itemID, desc, BuildSimpleItem("S2" & itemID , "", "{NBSP}{NBSP}" & desc ))
comboProduct.SetActiveItemId( itemID )

The key is to set the active item with SetActiveItemId(). Otherwise the description is displayed correctly.

For example, if you set PlaceHolderText the quote displays correct.
B4X:
comboProduct.PlaceHolderText = desc
 
Upvote 0
Top