|
|
|
|
This is a quick tip that allows you (the Progress programmer) to quickly and easily place a combo-box in a frame, and have the combo-box be populated, at run-time, with values from the records in the table. It does this by defining a custom combo-box, which, when dropped in a frame, runs a dialog-box that asks you for the requisite information (table name, field name, and, optionally, a where clause). The code is then generated to populate the combo-box. To use this technique, first download TTTneatstuff.zip. The file tttechno.cst can be placed anywhere convenient, but the file d-combo-fill.w must be placed in a directory in your propath. Next, run the AppBuilder and from the Palette window select Menu à Use Custom. Add the file tttechno.cst to the list of custom object files. Then choose Menu à Options à Save Palette. To add an auto-loading combo-box to a frame, right-click on the combo-box icon in the Palette window, and choose Auto-filled. Then drop it on the frame. Critics will point out that combo-boxes shouldn't used be used with a large number of options, which is possible with this tool. I agree, use this responsibly. And you may want to use this as just a starting point to build your own custom widgets. |
|
Copyright © 2005 Tim Townsend Technologies. All rights reserved. |