iOS Question Toolbar button Initialize Bitmap

Emme Developer

Well-Known Member
Licensed User
Longtime User
Hi everybody, i'm trying to put 4 buttons with custom icon on toolbar buttons, but i got a very big icon. There is a way to stretch bitmap according to button size, or simply load bitmap with a specific size?

This is the code:
B4X:
    Dim l As List
    l.Initialize
    Dim b As BarButton
    b.InitializeBitmap(LoadBitmap(File.DirAssets,"ios_menu_1_on.png"),"0")

    b.Enabled = True
    l.Add(b)
'  
    Dim b As BarButton
    b.InitializeSystem(b.ITEM_UNDO,"0")
    b.Enabled = True
    b.TintColor = Colors.Red
    l.Add(b)
  
    mpa.ToolbarButtons = l


Thanks for help!
 

Emme Developer

Well-Known Member
Licensed User
Longtime User
Thanks for answer @Erel, it works. Another question, is possible to set a label under the bitmap? I want to achieve this result
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…