The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



EditRowEntries


Unit:SDL_replist
Class:TReportListView
Declaration: [1] function EditRowEntries (Row: longint; PosLeft, PosTop: integer): integer;
[2] function EditRowEntries (Row: longint; PosLeft, PosTop: integer; FormCaption, ButOKCaption, ButCancelCaption: string): integer;
[3] function EditRowEntries (Row: longint; ContainerForm: TForm; PosLeft, PosTop: integer): integer;

The method EditRowEntries provides a simple means to edit all cells of a particular row of the report list view.

There are three different overloaded versions of EditRowEntries which differ in their functionality: the first version is the simplest one, it displays a simple editing window which shows all cells of a row plus a "Cancel" and an "OK" button. The second version does the same but with more options to be set by the calling program (caption of form, captions of buttons). The third version displays the cell editing elements within a user-supplied container form.

The parameter Row specifies the row number of the cells to be edited. The parameters PosLeft and PosTop have two different functions: in the first and second version these parameters specify the top left corner of the default edit form, in the third version the position of the edit controls within the container form is specified. Thus you can position the array of edit controls within the container form.

The parameters FormCaption, ButOKCaption, and ButCancelCaption define the captions of the form and buttons. The parameter ContainerForm contains the form which is used to display the editing elements.

The function returns mrOK if the user clicked the OK button, and mrCancel if the user clicked the Cancel button.

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): replistv



Last Update: 2023-Dec-13