Good morning,
while I'm trying to get my validation run, i noticed that it is not possible to use
linebreaks inside AB Alertbox oder Messagebox. Or better, i can use it and it gets parsed but
but no linebreak will be executed.
Could this be changed?
I've seen that a JS-Alert can use linebreaks, but they don't look so fancy like the AB ones ;-)
thanks and regards
Antonio
Hello Antonio,
Good morning! A couple of things to consider here. First of all, certainly the native Alert doesn't look too better, however, is native... and, for example, in Android, the native Alert (and including/checking the Cordova's Dialogs plugin in the app's options) looks very nice. So this is the first thing to consider.
The second thing is, what about use certain app view to act like the "alert dialog"? May you can prepare a Textarea or HTML control in an specific app's view, and then, use the ShowDialog action to shown that view in a dialog way. So in certain mode you can create your own custom message box using an app view.
Hope this can helps!
Hello Antonio,
My above reply continue be valid, however, you can also upgrade your AB copy, because now both "AlertBox" and "MessageBox" actions supports multilines in their contents. However note that we are talking about HTML content, so you must modify your code to replacing the "\n" line breaks to be "
" HTML tags.
Hi David,
thanks for your input. I've tried out both solutions now,
i didn't know that the Alert will be used as native alert, so yes this one looks good and is multiline. Fits my needs for now.
I also like the dialog solution, just one question here. Is it possible to make the DialogView smaller than the other views?
I ask that because when i show the dialog in modal its so large that is scrolls ab bit and i would like to prevent the dialog view from scrolling,
it should be less in the height.
thanks and regards
Antonio
Hello Antonio,
Yes; Please, in the app's view that you shown as a dialog, put the below code in their Show event:
I use 'ShowDialog '
but only the view's height is changed ,the width seems not work
Hello Joshua,
I use 'ShowDialog '
but only the view's height is changed ,the width seems not work
Due to certain recent enhancement we can't use the "SetViewSize" action on modal views anymore. Instead of it we can use the "SetStyle" action instead:
* The above code is used in the AboutView of the App Builder's Database app sample.
** The change that I talking about is refered in the program's history file (Menu -> Help -> History):
2017.42 (05/25/2017)
* The global app's variable [App.CurrentView] is no more modified by modal views, that is, when we show a view in a modal way (using the "ShowDialog" action) that view do not modify the [App.CurrentView] variable. If we needed, we can continue using the [App.DialogView] global app's variable, which contains the current view showing as modal.
Hello Joshua,
Please forget my previous post and upgrade your AB copy:
2017.44 (06/01/2017)
* A recently changed causes that the SetViewSize action cannot be used in modal views (we must use the SetStyle action instead). This release fix this unexpected behaviour and now we can continue using the SetViewSize even in modal views.
I changed the Showevent code in 'AboutView' of the sample database
But the width of the 'AboutView' is still not changed,
as the pic showed bellow
[img=QQ??20170602075625_afterchangecode.jpg]https://www.decsoftutils.com/_support/uploads/be3ba40e8108fed8151b452876713ae0.jpg[/img]
this pic will show better
[img=20170602080637.jpg]https://www.decsoftutils.com/_support/uploads/e21893017392f417af046e1eb8934889.jpg[/img]
Hello Joshua,
Where you place the action? In the view's "Show" event, don't you? Are you updated AB? Are trying with the "Database" included sample? Are you sure the "[Height]" variable is really available? The action works here, so, must work in your case too!
Hello Joshua,
Probably this do not affect this case (because we are using the action in a modal view), however, I discover an introduced bug if we try to use the action over the first initial view (no mal) for example. I fix that bug so please, before anything, ugprade your App Builder copy!
I update my AB
in database sample,'AboutView' Show event
It seems I can set the height of 'AboutView',but the width is not set,
only the width of the Html control and the Button in 'AboutView' has been set
[img=20170602140157.jpg]https://www.decsoftutils.com/_support/uploads/b3849d4f494aa9551ffbd7ce98c9c910.jpg[/img]
Hello Joshua,
I got it. Certainly this appear another issue that must be investigated.
I will do it when possible and then inform you about!
Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.