> Le 9 févr. 2021 à 16:12, Joey Fish <tigerscla...@hotmail.com> a écrit : > > Ok, so I’m having a little problem getting information from a > dynamically-created element for a reporting-system I am building. – It works > by having a draggable DIV containing elements/values the user wishes to > report, dragging it to a specified area on the form, and then populating the > form with elements set to the appropriate values. – This works well and > straightforward for the case where the data is statically known, because I > can put that element in a record-field, but not so much when the elements are > generated via dynamic methods (INI-file in this particular case).* > > HTML elements in play: > (1) The FORM element; > (2) The DIV containing the elements of a report; > (3) The SELECTs populated by the INI-file’s data; > (4) The DIV containing the FORM elements to submit. > Note: the DIV in #2 is not part of the FORM, but rather a template the user > completes and then is processed by the drag-event handler to add > form-elements to the form. > > So, what is the best way to obtain a Gnoga element from a given ID? > * I could initialize a vector to hold the elements when they are generated, > but it seems like there should be a method to query the view for a > child-element of given ID.
Hello Joey, See Tips #11 on Gnoga wiki: https://sourceforge.net/p/gnoga/wiki/Gnoga-Home • How do I get a hold on a child element, on the gnoga side, knowing its ID? My_Button.Attach_Using_Parent (View, ID => "my_button"); See a simple example: https://sourceforge.net/p/gnoga/code/ci/dev_1.5/tree/tutorial/tutorial-04/tutorial_04.adb#l123 A more complex example: https://sourceforge.net/p/gnoga/code/ci/dev_1.5/tree/demo/adablog/adablog-view.adb#l44 https://sourceforge.net/p/gnoga/code/ci/dev_1.5/tree/demo/adablog/adablog-controller.adb#l38 HTH, Pascal. https://blady.pagesperso-orange.fr _______________________________________________ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list