Tech Tip: Cell level entry control for list box
PRODUCT: 4D | VERSION: 13.0 | PLATFORM: Mac & Win
Published On: May 25, 2012
Starting in 4D v13, a cell enterability can be controlled based on specific condition. This ability makes user interface programming flexibility and data driven. Here is an example of how to reject an enterability to a cell when the cell value is empty.
// Object Method: List Box Case of : (Form event=On Before Data Entry) C_LONGINT($0;$col_l;$row_l) C_POINTER($col_p) LISTBOX GET CELL POSITION(*;"List Box";$col_l;$row_l) $col_p:=OBJECT Get pointer(Object current) If ($col_p->{$row_l}="") $0:=0 // Enterable Else $0:=-1 // Not Enterable End if End case |