Thank you -- that function wasn't in the lh navigation for the documentation so I missed it. Even better, as I'm using Lua, "In Lua, if the container was created in Lua and children specified during the creating, you can access any child of the element using the notation "elem[n]", where n is the index of the child".
Now I think I can make it work. I shall have to first iterate over the various (variable) containers and then over the controls within each container, test the type of each control to work out how to clear it, and then clear it but now I believe can produce a 'helper function' to do this for a chosen dialog whenever I'm using iuplua. -----Original Message----- From: Ariset <[email protected]> Sent: 26 February 2019 14:57 To: IUP discussion list. <[email protected]> Subject: Re: [Iup-users] Clearing the values of all controls within a dialog you can use http://webserver2.tecgraf.puc-rio.br/iup/en/func/iupgetnextchild.html and IupGetChildCount to loop over childrens, you'd need to used them in a recursive wayif you need to go deeper than the first level. 2019-02-26 10:25 GMT-03:00, [email protected] <[email protected]>: > How would I loop over them? That’s what I was hoping was possible > without maintaining a list of the controls, as they’re declared within > library functions (in lua) and not exposed as globals… I looked at > the documentation and couldn’t see how to loop through them. > > > > From: Antonio Scuri <[email protected]> > Sent: 26 February 2019 12:43 > To: IUP discussion list. <[email protected]> > Subject: Re: [Iup-users] Clearing the values of all controls within a > dialog > > > > That's not complicated to implement. You just have to loop over the > controls of the dialog. Or I misunderstood what you want. > > > > Best, > > Scuri > > > > > > Em ter, 26 de fev de 2019 09:04, <[email protected] > <mailto:[email protected]> > escreveu: > > A pity but thanks – I might have to rethink offering the option. > > > > From: Antonio Scuri <[email protected] > <mailto:[email protected]> > > Sent: 26 February 2019 11:41 > To: IUP discussion list. <[email protected] > <mailto:[email protected]> > > Subject: Re: [Iup-users] Clearing the values of all controls within a > dialog > > > > Hi, > > > > No, you have to clear each one. > > > > Best, > > Scuri > > > > > > Em ter, 26 de fev de 2019 08:37, <[email protected] > <mailto:[email protected]> > escreveu: > > Is there a simple technique to clear the values of all the text fields > and lists within a dialog, or do they each have to be done one at a > time? I want to give my users the option to clear all their input at once. > > > > Thanks > > > > Helen > > _______________________________________________ > Iup-users mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/iup-users > > _______________________________________________ > Iup-users mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/iup-users > > _______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users _______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users
