Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

menu-items-for-combo-box-range

Arguments: range-object-list row column

This generic function is called when a grid combo-box cell (a cell in a combo-box-column-mixin column) is about to show its choices to the user as a pop-up menu that is displayed somewhat like a combo-box. The method returns a list of menu-items to display. The menu-values are a list of the actual choices for the cell, as returned by the column's range-reader function called on the row's data-object.

The default method creates menu-items with the print-name of each choice displayed in the menu. An application could add a method to this generic function to instead create menu-items that have some sort of alternative string displayed on the menu for each choice.

Here's an example of defining a custom menu-items-for-combo-box-range method for an application's own combo-box grid-column subclass. The method adds a sequential number (1 through N) to each of the choices that are displayed to the user.

(defclass my-combo-box-column 
          (combo-box-column-mixin grid-column)())

(defmethod menu-items-for-combo-box-range
    (range-object-list row (column my-combo-box-column))
  (declare (ignore row))
  (let* ((number 0))
    (mapcar #'(lambda (object)
                (make-instance 'menu-item
                  :value object
                  :title (format nil "~a ~a" (incf number) object)))
      range-object-list)))

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version