LAMW jListView OnDrawItemWidgetBitmap does not seem to work lazarus / 43-Android ---------------------------------------------------------------------- Robert Gilland · 2019-04-19 01:06 HI, Just attempting to create a listview with a different image per list item, to the left of the text. The Below code does not seem to work at all, no idea why: procedure TAndroidModule1.jListView1DrawItemWidgetBitmap(Sender: TObject;   itemIndex: integer; widgetText: string; out bimap: JObject); begin   if( itemIndex >= 0 )and( itemindex < jImageList1.Count )then     begin       bimap := jImageList1.GetBitmap(itemIndex);     end; end;      object jListView1: jListView       Tag = 1       Left = 0       Top = 0       Width = 292       Height = 657       MarginLeft = 0       MarginTop = 0       MarginRight = 0       MarginBottom = 0       Enabled = True       Visible = True       Id = 3721116       PosRelativeToAnchor = []       PosRelativeToParent = [rpTop, rpCenterHorizontal]       LayoutParamWidth = lpMatchParent       LayoutParamHeight = lpMatchParent       Items.Strings = (         'BARRY'         'FRED'         'HARRY'         'MARY'       )       BackgroundColor = colbrDefault       FontColor = colbrMidnightBlue       FontSize = 0       WidgetItem = wgNone       Delimiter = '|'       TextDecorated = txtNormal       ItemLayout = layWidgetTextImage       TextSizeDecorated = sdNone       TextAlign = alLeft       HighLightSelectedItemColor = colbrRed       FontSizeUnit = unitDefault       ItemPaddingTop = 40       ItemPaddingBottom = 40       WidgetTextColor = colbrDefault       OnDrawItemWidgetBitmap = jListView1DrawItemWidgetBitmap     end ---------------------------------------------------------------------- jmpessoa · 2019-04-19 01:11 just this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jListView1DrawItemWidgetBitmap(Sender: TObject;  itemIndex: integer; widgetText: string; out bimap: JObject);begin    bimap := jImageList1.GetBitmap(itemIndex);end; ---------------------------------------------------------------------- Robert Gilland · 2019-04-19 01:32 Working now, thank you, changed to: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jListView1DrawItemBitmap(Sender: TObject;  itemIndex: integer; itemCaption: string; out bimap: JObject);begin  bimap := jImageList1.GetBitmap(itemIndex);end;    object jListView1: jListView    Left = 0    Top = 0    Width = 300    Height = 662    MarginLeft = 0    MarginTop = 0    MarginRight = 0    MarginBottom = 0    Enabled = True    Visible = True    Id = 1    PosRelativeToAnchor = []    PosRelativeToParent = []    LayoutParamWidth = lpMatchParent    LayoutParamHeight = lpMatchParent    Items.Strings = (      'BARRY'    'FRED'      'MARY'      'MISSUS'    )    BackgroundColor = colbrDefault    FontColor = colbrDefault    FontSize = 0    WidgetItem = wgNone    Delimiter = '|'    TextDecorated = txtNormal    ItemLayout = layImageTextWidget    TextSizeDecorated = sdNone    TextAlign = alLeft    HighLightSelectedItemColor = colbrDefault    FontSizeUnit = unitDefault    ItemPaddingTop = 40    ItemPaddingBottom = 40    WidgetTextColor = colbrDefault    OnDrawItemBitmap = jListView1DrawItemBitmap  end  object jImageList1: jImageList    Images.Strings = (      'btn1_1.png'      'btn1_2.png'      'image01.png'      'image02.png'      'lazarus_logo.png'    )    left = 64    top = 314  end