Rogue Wave Views Data Access Common Framework > Data Sources and Gadgets > Data-Source-Aware Gadgets > IliDbOptionMenu
 
IliDbOptionMenu
Figure 4.16    The IliDbOptionMenu Hierarchy and Example Gadget
The IliDbOptionMenu class defines an option menu gadget that can be connected to a data source. This gadget opens a pull-down menu when the user clicks the gadget. The pull-down menu displays a column of foreign tables of the field.
IliDbOptionMenu* opt;
opt = new IliDbOptionMenu(display, IlvRect(20, 30, 150, 21));
panel->addObject(opt);
 
// Connect the Option Menu to EMP(DEPTNO)
opt->f_setDataSourceName(“EMP”);
opt->f_setDataSourceColumnName(“DEPTNO”);
 
// Specify the mapping as DEPT(ID -> NAME)
opt->f_setForeignDataSourceName(“DEPT”);
opt->setForeignValueColumnName(“ID”);
opt->setForeignDisplayColumnName(“NAME”);

Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.