Jamy
02/20/2021, 7:26 AMRobert Jaros
02/20/2021, 1:45 PMFormPanel
was designed to be an example implementation of visual form component. The form logic is extracted to the From
class, so FormPanel
is just taking care of visualization. I've assumed users can just implement their own FormPanels.Robert Jaros
02/20/2021, 1:46 PMFormPanel
.Robert Jaros
02/20/2021, 1:47 PMFormPanel
become quite complex, I'll take a look if something can be improved to make it more reusable.Robert Jaros
02/20/2021, 3:10 PMcustomContainer
parameter for the FormPanel
class. It will be available in 4.1.0 (I plan the release for this weekend). It will work like this:
formPanel<Form>(customContainer = HPanel(spacing = 20)) {
add(Form::text, Text(label = "Text 1"))
add(Form::text2, TextArea(label = "Text 2"))
}
Robert Jaros
02/20/2021, 3:12 PMJamy
02/22/2021, 11:47 PMRobert Jaros
02/23/2021, 11:48 AMbind
. Like this:
formPanel<Form> {
hPanel(spacing = 5) {
text(label = "text 1").bind(Form::text, required = true)
vPanel(spacing = 5) {
textArea(label = "text 2").bind(Form::text2)
textArea(label = "text 3").bind(Form::text3)
}
}
}
What do you think? I personally really like this idea.Jamy
02/23/2021, 1:31 PM