# Load List Box and Grid Controls

> Source: https://manual.pvxplus.com/how-to/load-lbox-and-grid-ctrls

Query definitions can be used to automatically load List Boxes and Grids. All you have to do is create a query definition describing the columns you want to include in your control, including column titles, widths and even images!

To load a control, just add a CALL to the **\*winlist** program in your program referencing the query definition and the CTL number of the control to be loaded:

```
CALL "*winlist",qName$,qLibrary$,controlCTL
```

If you are loading a Report View List Box or a Grid, you do not even have to define a format for the control. That will be done automatically based on the column definitions.

Note:  
Drop Boxes and standard List Boxes are not formatted and will display only one column.

***Example:***

In this example, a Report View List Box is created with a CTL value of 101. Then, the CALL to **\*winlist** automatically loads the List Box with the contents of the query.

![](https://manual.pvxplus.com/migration-assets/e28378e34ba2a216ec3f4189be4cda8019ccdceb57c67c7820030666cbd20523.png)

## See Also

**[Using Smart Controls Outside of NOMADS](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/using-smart-controls-outside-of-nomads)**
