DynamicDialog - A blank dialog that you can style, add components to, register component events and direct events to your procedure.
DynamicDialog is intended to provide a way to build almost any dialog you can imagine and use your own procedure to catch events. This is useful when you have a large number of blocks and the “Any” events are getting out of hand. You can use one DynamicDialog in your project for all dialogs and keep the event block next to the calling blocks. Appearance can be changed in designer or blocks.
Please take a look at the examples as they will answer most questions.
This is my first extension and first time dabbling in Java. The source code will be available soon.
Full credit to Evan W. Patton for event handling code. The code to find the procedure and fire the event was listed on Kodular Community. I would never have figured this out…
/**
- Funcall is an example extension for calling procedures defined in the blocks language in an
- asynchronous way.
- @author ewpatton@mit.edu (Evan W. Patton)
*/
Please understand it may take me some time to respond as I’m not at a computer often.
Specifications
Package: com.dgray.DynamicDialog
Size: 21.52 KB
Version: 1.0
Minimum API Level: 21
Updated On: 2026-08-14T14:00:00Z
Built & documented using: FAST v7.0.0
Event:
DynamicDialog has total 1 event.
1. EventFired
The EventFired event is raised when a registered event handler fires of the given event name
for the given component previously registered with RegisterForEvent. You can use this or set your own procedure with EventProcedure.
| Parameter | Type |
|---|---|
| component | component |
| componentid | text - name of the component |
| event | text - registered event |
| arguments | list |
Methods :
DynamicDialog has total 8 methods.
1. CreateDialog

Initialize a blank dialog
2. Show

Show the dialog
3. Close

Close the dialog
4. CreateComponent
Creates a new component with the given name of the given type.
- Return type:
component
| Parameter | Type |
|---|---|
| in | component |
| type | text |
| name | text |
5. SetViewMargins
Sets the margin in pixels. Does not have to be a DynamicDialog generated component.
| Parameter | Type |
|---|---|
| viewcomponent | component |
| left | number |
| top | number |
| right | number |
| bottom | number |
6. SetViewPadding
Sets the padding in pixels. Does not have to be a DynamicDialog generated component.
| Parameter | Type |
|---|---|
| viewcomponent | component |
| left | number |
| top | number |
| right | number |
| bottom | number |
7. GetComponent
Gets an existing component with the given name.
- Return type:
component
| Parameter | Type |
|---|---|
| name | text |
8. RegisterForEvent
Registers a handler for the given component name and the given event name. Returns true if
the event was registered successfully, otherwise false.
- Return type:
boolean
| Parameter | Type |
|---|---|
| componentName | text |
| eventName | text |
Designe r:
DynamicDialog has total 9 designer properties.
1. Cancellable
- Input type:
boolean - Default value:
True
2. VerticalGravity
- Input type:
vertical_alignment - Default value:
1
3. BackgroundColor
- Input type:
color - Default value:
FFFFFF
4. CornerRadius
- Input type:
integer - Default value:
0
5. BorderStroke
- Input type:
integer - Default value:
0
6. BorderColor
- Input type:
color - Default value:
000000
7. DialogPadding
- Input type:
integer - Default value:
0
8. FillWidth
- Input type:
boolean - Default value:
False
9. FillFullScreen
- Input type:
boolean - Default value:
False
Properti es:
DynamicDialog has total 10 setter properties.
1. EventProcedure
Procedure name for events
- Input type:
text - Must be a procedure with 3 arguments. “Component, Componentname, event”
- Component: Component that generated the event
- Componentname: Name you gave the component when you created it
- event: The event name, such as “Click” for a button
2. Cancellable
Is the dialog cancel-able. If True, user can cancel the dialog by touching outside the dialog or using the back button.
- Input type:
boolean
3. VerticalGravity
A number that encodes how the position of the DynamicDialog are aligned vertically. The choices are: 1 = aligned at the top, 2 = vertically centred, 3 = aligned at the bottom. Alignment has no effect if the dialof is full screen
- Input type:
number - Helper type:
VertPosition - Helper enums:
Top,Center,Bottom
4. BackgroundColor
Color for background.
- Input type:
color
5. CornerRadius
Dialog corner radius in pixels
- Input type:
number
6. BorderStroke
Dialog corner radius in pixels
- Input type:
number
7. BorderColor
Color for background.
- Input type:
color
8. DialogPadding
Dialog padding around the VerticalAlignment in pixels. If corners are rounded the actual padding prevents clipping on the corners by default (padding + radius)
- Input type:
number
9. FillWidth
Is the dialog full screen width
- Input type:
boolean
10. FillFullScreen
Is the dialog full screen
- Input type:
boolean
Gett ers:
10. DialogVerticalArrangement
The container to add dynamic components to
- Return type:
any
Version 1.0
com.dgray.DynamicDialog.aix (21.5 KB)
Basic re-usable input dialog example
DynamicDialogEasy.aia (25.9 KB)
Example full screen multi/single select dialog with option to add to the selection list.
Example also uses other extensions to style components within the dialog.
DynamicDialogAdvanced.aia (226.7 KB)
Source code:






