Recent

Author Topic: LAMW : How to use custom fonts in JListview?  (Read 1104 times)

MFP

  • Newbie
  • Posts: 4
LAMW : How to use custom fonts in JListview?
« on: November 18, 2021, 05:37:21 am »
hi

How to use custom fonts in JListview
There is no SetFontFromassets function for Jlistview?

jmpessoa

  • Hero Member
  • *****
  • Posts: 2052
Re: LAMW : How to use custom fonts in JListview?
« Reply #1 on: November 18, 2021, 11:05:56 pm »

Done!

Improved jListView component!

New jListView event:

      OnDrawItemCustomFont

Updated demo "AppCustomFontDemo1"

Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.jListView1DrawItemCustomFont(Sender: TObject;
  2.   position: integer; caption: string; var outCustomFontName: string);
  3. begin
  4.    //if position = 0 then outCustomFontName:= 'ARBONNIE.TTF';
  5.    outCustomFontName:= 'ARBONNIE.TTF';    // From folder "assets" !!
  6. end;  
  7.  


Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

MFP

  • Newbie
  • Posts: 4
Re: LAMW : How to use custom fonts in JListview?
« Reply #2 on: November 19, 2021, 05:57:42 pm »

Done!

Improved jListView component!

New jListView event:

      OnDrawItemCustomFont

Updated demo "AppCustomFontDemo1"

Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.jListView1DrawItemCustomFont(Sender: TObject;
  2.   position: integer; caption: string; var outCustomFontName: string);
  3. begin
  4.    //if position = 0 then outCustomFontName:= 'ARBONNIE.TTF';
  5.    outCustomFontName:= 'ARBONNIE.TTF';    // From folder "assets" !!
  6. end;  
  7.  


Thank you!

Excellent!

Thank you so much

 

TinyPortal © 2005-2018