Android Question How to do as in visual basic

I'm sorry if an answer to this question has already been posted, but I didn't find anything in the forum.
Is it possible to do the following in B4A like Visual Basic
 
Last edited:

JohnC

Expert
Licensed User
Longtime User
The built-in MsgBoxAsync does not have the ability to display icons in the pop-up prompt.

Do a forum search of "custom dialog" to get a list of libraries that can do what you want.
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Are you only wanting ability to display Icon .. ? Msgbox2Async

 
Upvote 0
I am developing a custom message box with four icons, which I will enlarge later. That's why I want to select them from the drop-down menu directly in the B4A editor, in principle in visual basic.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
You can create it as a class and add in the class public variables that will represent the images whether directly or indirectly.
F.e.
B4X:
Dim mymsg As Mymsgclass
mymsg.Initialize
'You will have to create a public "Show" method in the class
mymsg.Show("Message", mymsg.Critical, "Title")
 
Upvote 0
For now I wrote the code like this:
B4X:
Sub MsgC (Prompt As String, Icon As Int, Title As String, Yes As String, No As String, Cancel As String) As ResumableSub
    Dim bmIcon (10) as Bitmap
    bmIcon(1) = LoadBitmap(File.DirAssets,"icon1.ico")
    bmIcon(2) = LoadBitmap(File.DirAssets,"icon2.ico")
    .....
    
End Sub

I searched the forum for B4XDialog, but did not find it.
I only found out that it is a class module but I didn't find it anywhere!

https://www.b4x.com/android/forum/threads/b4x-xui-views-cross-platform-views-and-dialogs.100836/
https://www.b4x.com/android/forum/threads/b4x-xui-b4xdialog-custom-dialogs.99756/
https://www.b4x.com/android/forum/threads/library.111939/

Maybe I can't find my way or B4XDialog has been removed.
 
Upvote 0

CaptKronos

Active Member
Licensed User
Longtime User
B4XDialog is part of the XUI Views library. Add that library and then you will be able to declare:
B4X:
Dim dialog as B4XDialog
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…