B4A Library Dialogs library

Status
Not open for further replies.

CharlesR

Member
Licensed User
Longtime User
Thank you for your earlier help. I am getting on well with your excellent dialogs but have one question which is probably very simple. I am using this code to get an opening time, but would like to pad it so it displays hour and minutes both as 2 digits eg in the format 06:00 please could you show me how to do that. Sorry for another newbie question.

Sub openTime_Click
Dim td As TimeDialog
Td.Hour = 06
Td.Minute = 00
Td.Is24Hours = True
ret = Td.Show("Set the opening time", "Opening Time", "Yes", "No", " ", Bmp)
openingTime = Td.Hour & ":" & Td.Minute
openTime.Text = openingTime
ToastMessageShow(ret & " : " & Td.Hour & ":" & Td.Minute, False)
End Sub

Charles
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hello Charles,

Please try this:

DateTime.TimeFormat="HH:mm"
openTime.Text = DateTime.Time(td.TimeTicks)

Cheers
Robert
 

CharlesR

Member
Licensed User
Longtime User
I am obviously missing something very simple, but in the previous time dialog, the returned time displays in the button, but in this number version it does not. Can anyone explain what I am doing wrong please?

Sub getfloorArea_Click
Dim nd As NumberDialog
nd.Digits = 5
nd.Number = 6000
nd.Decimal = 0
nd.ShowSign = False
ret = nd.Show("Floor Area", "Yes", "No", " ", Bmp)
floorArea = nd.Number
End Sub

Thanks Charles
 

agraham

Expert
Licensed User
Longtime User
It seems a shame to post a new version and see the download count drop from 376 to 0 This must be the most downloaded library I have written.

I can't believe that it didn't occur to me to do this until now. Adding a view to the original Custom dialog required specifying its absolute position within the dialog as well as its size. This made centering the view in the dialog a bit hit and miss on different screen sizes.

I have now added a Custom2 dialog that requires only the view size specifying, the added View will be automatically centred in the dialog.

By the way, Android 3.0 Honeycomb appears to automatically wrap a dialog to the size of the added view, ignoring the top and left parameters so Custom and Custom2 dialogs appear identical on my Motorola Xoom. EDIT :- This is not in fact correct. I was being mislead by having an overrlarge Panel that I was adding to a Custom dialog!
 
Last edited:

tremara1

Active Member
Licensed User
Longtime User
new version

I love this library, it is a tool I will use alot. I just downloaded ver 2.1 when I unzipped it there is no .jar or .xml. There was a demo which throws an error
B4X:
Error parsing program.
Error description: Unknown type: customdialog2
Are you missing a library reference?
Occurred on line: 124
Dim cd As CustomDialog2
my current library is 2.0...did I miss something? ...again thanks for all your great work.
 

Cor

Active Member
Licensed User
Longtime User
using 2.1

when clicking for the second time the custom dialog button you will get at remove view error
 

Cor

Active Member
Licensed User
Longtime User
It goes wrong when i wanted to add a label to the pnl

and i wanted to update this label outside the custum click routine

I have now updated my routine and it is working ok, without label
 

Colin

New Member
Licensed User
Longtime User
FileDialog FileFilter

I want to limit the files in a filedialog to a specific file extension but show all files of that type regardless of case. I think I read somewhere that the filter (or android) is case sensitive.

Does the FileDialog FileFilter allow multi file types as it does in Basic4PPC or only a single file type?
Does it support wildcards?

Thanks
Colin
 

aklisiewicz

Active Member
Licensed User
Longtime User
I have copied the files to the
C:\Program Files\Anywhere Software\Basic4android\Libraries\Dialogs2.2
but I cannot see the library on the reference list list.

Am I missing something ?

Arthur
 

klaus

Expert
Licensed User
Longtime User
You must unzip the the zip file.
Copy Dialogs.jar and Dialogs.xml to
C:\Program Files\Anywhere Software\Basic4android\Libraries

If you have installed a folder for the addidtinal libraries you could copy these two files to this folder rather than to the folder above.

Best regards.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…