I can’t figure out how to do this … 

Using a dynamic form, I am trying to build a generic list of records to display 
to the user and to allow him to select 1 record.

I used the example from the tech note on how to create a dynamic form that 
shows a listbox.

To build this $form object variable, the commands New object and others are 
used.

This listbox object is added to the $page object in the $form object, which 
will be used in the DIALOG command.


$obj:=New object("type";"listbox";"listboxType";"collection";\ 
"dataSource";$colName;"left";0;"top";0;"width";$width+15;"height";$height)



$page:=New object("objects";New object("myListBox";$obj)) $form:=New 
object(“pages";New collection(Null;$page))

$form:=New object("windowTitle";"Select a 
Map:";"windowMinWidth";500;"windowMinHeight";300;"pages";New 
collection(Null;$page))  

Now, this dynamic form only shows a listbox, and I want to add a button to the 
form. I assume this button object has to be added to the ‘Objects’ object in 
$page.

But, how do I do that? I tried object arrays and collections, but neither of 
them produces the correct result. 


Secondly, the listbox displays an entity selection. How do I get the row number 
that has been selected?



Regards,

Rudy Mortier
Two Way Communications bvba 



**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to