Use Windows.pkg Use cReportControlGrid.pkg Object oFieldChooserPanel is a ModalPanel Set Label to "Select Column(s)" Set Size to 199 162 Set piMinSize to 100 162 Set Location to 139 72 Set Border_Style to Border_Thick Set Locate_Mode to No_Locate Object oFieldChooser_tb is a TextBox Set Auto_Size_State to False Set Size to 25 117 Set Location to 3 10 Set Label to "You can drag and drop columns headers from here to the grid header row." Set Justification_Mode to JMode_Left Set FontWeight to 700 Set peAnchors to anTopLeftRight End_Object Object oFieldChooser is a cComFieldChooser Set Size to 122 135 Set Location to 30 10 Set peAutoCreate to acAutoCreate Set Color to clWhite Set peAnchors to anAll // See panel's Procedure Add_Focus on how this object is connected // to the Report Control grid. Procedure OnCreate Forward Send OnCreate Set ComAppearance to True // Creates a client edge around the object. // These are default settings; so no need to set: // Set ComEnabled to True // Set ComSortAscending to True // Alphabetically. End_Procedure // OnCreate End_Object // oFieldChooser Object oOK_Btn is a Button Set Label to "&OK" Set Location to 157 40 Set peAnchors To anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object // oOK_Btn Object oCancel_Btn is a Button Set Label to "&Close" Set Location to 157 95 Set peAnchors to anBottomRight Procedure OnClick Send Close_Panel End_Procedure End_Object // oCancel_Btn // Here we connect the fieldchooser object to // the ReportGrid object. Procedure Add_Focus Handle ho Returns Integer Integer iVal Handle hoReportGrid Variant vFieldChooser Forward Get msg_Add_Focus ho to iVal // If an icon is to be used in a modalpanel it needs to be set here. Set Icon to "App.ico" Get pvComobject of oFieldChooser to vFieldChooser Delegate Get phoReportControl to hoReportGrid If (hoReportGrid > 0) Set ComFieldChooser of hoReportGrid to vFieldChooser Procedure_Return iVal End_Procedure // Add_Focus On_Key Key_Alt+Key_O Send KeyAction of oOK_Btn On_Key Key_Alt+Key_C Send KeyAction of oCancel_Btn On_Key kCancel send KeyAction of oCancel_Btn End_Object // oFieldChooserPanel