IWidget[char[]] createdWidgets; gui.begin(cfg); foreach (name; widgetsToUse) { createdWidgets[name] = createWidget(name) .layoutAttribs("hexpand vexpand hfill vfill"); } gui.end();