B4J Question [SOLVED] [B4J] [B4X] how do I set an icon? in xui.Msgbox2Async //javafx.scene.image.Image

a6000000

Member
Licensed User
Longtime User
[solved]
[EDIT]

how set icon on xui.Msgbox:

[B4X] [XUI] Msgbox :
https://www.b4x.com/android/forum/threads/b4x-xui-msgbox.85201/#content :

B4X:
Dim icon As B4XBitmap = xui.LoadBitmapResize(File.DirAssets, "warning.png", 60dip, 60dip, True)
Dim sf As Object = xui.Msgbox2Async("Delete file?", "Title", "Yes", "Cancel", "No", icon)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
   Log("Deleted!!!")
End If
[/EDIT]


javafx.scene.image.Image

B4X:
'  B4X '

    'xui.Msgbox2Async(msg strg, title strg,
    '                 positive "Yes", cancel "Cancel", negative "No",
    '                 dialog-icon javafx.scene.image.Image  or Null)

    xui.Msgbox2Async(msg, "","","","OK", Null)

1603354527750.png




ok: [B4J] [B4X] favicon32x32.png is in Files Folder. set an icon:

Windows desktop:

icon_how.png




designer, no icon to see:

icon_how2.png


In Order to add new images, you should first add the images to the "Files" list.

I clicked [Sync] in Files Manager:

[EDIT] but forget: Visual Designer: Files Tab:
- [Add Files]
- [Refresh]
//see answer
[/EDIT]

Files_Manager_icon_how4.png



Windows Explorer:
Files_icon_how3.png
 

Attachments

  • Msgbox_icon_how5.png
    Msgbox_icon_how5.png
    27.5 KB · Views: 236
Last edited:

a6000000

Member
Licensed User
Longtime User
You add it in Visual Designer


View attachment 101887

OK thanks, I did not do:

Visual Designer: Files Tab:
- [Add Files]
- [Refresh]
//sorry, this is not easy to find in the forum


And now, I hope, someone can make icon on xui.Msgbox , ?



Msgbox_icon_how6.png


B4X:
    'xui.Msgbox2Async(msg strg, title strg,
    '                 positive "Yes", cancel "Cancel", negative "No",
    '                 dialog-icon javafx.scene.image.Image  or Null)

    xui.Msgbox2Async(msg, "","","","OK", Null)

haa, it's nice, the icon also appears on Msgbox although zero is in the code. ..

[EDIT] [SOLVED] see first post [/EDIT]
 
Last edited:
Upvote 0
Top