My First Library - Dialogs

Star-Dust

Expert
Licensed User
Longtime User
I thought about creating my Dialogs Library.
Since Anywhere SW has released B4A 7.01 I wondered who would develop the libraries to recompile them by modifying them with the new KeyWord and who was developing new ones if they would think that they were compatible with earlier versions.

So for my library I looked for a way that would be compatible with both the 7 and previous versions, so I would not cut out a whole developer community that uses a version just above the 7th.

This library has both methods that use old DoEvents, but also matching "alternative" methods that do not use DoEvents, WaitFor, or Sleep.

For the moment, please be content with a video. Then when I finish the job, I'll post the library, maybe the source ...


Esample:

B4X:
Sub ButtonFileDialog_Click
    Dim FD As FileDialog
    Dim R As Int
  
    FD.Initialize(Activity,Me,"FD")
    FD.Path=File.DirRootExternal
    FD.Show("Select a file" ,"Si","Cancel","No")
        'With DoEvents
    r=FD.DoEventWaitResponse
  
    ToastResponse(R,FD.FileName)
End Sub

Sub ButtonFileDialog2_Click
    Dim FD As FileDialog
  
    FD.Initialize(Activity,Me,"FD")
    FD.AddFilter("s3db","Sql Lite")
    FD.Show("Select a file" ,"Si","Cancel","No")
        ' Without DoEvents
End Sub

Sub FD_ClickResponse(Response As Int, FileName As String)
    'Event generate from FileDialogs
End Sub
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Working progress
1.png 2.png

image.1) MsgBox with timer
image.2) TimerDialog


All dialogs will have a timer:
B4X:
Sub ButtonMsgBox2_Click
    Dim B As MessageBox

    B.Initialize(Activity,Me,"MsgBox")
    B.NewMsgBox("What do you want?","Ask","Si","cancel","No")
    B.TimerDIalog(5000)  'If you want Timer for 5 sec
    ' R=B.DoEventWaitResponse 'if you like old dear DoEvents, but not necessary
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Penultimate update. ColorDialog was tiring .. creating a color wheel with an algorithm is not easy ... it lacks NumerDialogs and then it's ready.
In the meantime here is a small video demonstration ... I changed the graphics of some panel ...
 
Top