[Gambas-user] For Each controls
adamnt42 at gmail.com
Mon Oct 5 13:00:05 CEST 2020
On 5/10/20 7:17 pm, Dag Jarle Nerland Johansen - Gambas wrote:
> I need a refreshment in for Each of form objects.
> I can't find a proper example, a collection is not relevant, because it
> is defined in the example, the objects not.
> I want to collect the data i have on the screen, on the current form,
> content of label + content of textbox, nothing complicated.
> I have really no idea of how to initiate the "For Each" statement.
> The Textboxes are named as DA_ then the field name of the DB-table, e.g.
> To know this will be useful for me in other situations to.
> I assume a combination of two different control-types (label + textbox)
> is too difficult, please start simple with Textbox.
> Thanks in advance,
For Each .Window.Controls (gb.qt4)
Dim hWindow As Window
Dim hControl As Control
For Each hControl In hWindow.Controls
Enumerates each control that belongs to a window.
More information about the User