25 Sep 2006 

→ deutsche Version

Cursor-movement in Listboxes

Standard Cursormovement Without doing anything the cursor moves in an editable listbox in horizontal zickzack und stops in the lower right corner or moves into the next editable object. This is ok as long as the tabular-data is reminiscent to a record. It might be a hinderance in certain data-matrices, where every column is a kind and every row contains different data depending on kind. 4D handles that out of the box.

Vertical Cursor movementThis example lists phone, fax, cellphone, eMail, URL and pager in three columns. The columns are private, business and mobile. In this case I'd like to have the cursor move down first – all the private connections, then the next column – business and mobile connections – and at the very end restart with the first editable cell, which is private phone. 4D doesn't handles that out of the box, we need our own method.

I've solved that. When losing focus, I call LBox_Cursor_Movement ("vertical_EditMode"; $lb_ObjName; Focus object;3) which does the rest. The parameters are $1 the options as text, $2 the objectname of the listbox, $3 the object that counts (most of the time Focus object) and $4 the first editable column. In a matrix like this, the first visible column usually functions as labels, that's the reason for $4.

    That methode works like this:
  • declarations
  • error-checking
  • where is the cursor
  • find next editable cell, if Shift is pressed, find previous editable cell
  • if edit-mode, EDIT ITEM

the methode Correct, hard to read! Therefore here is the download. This is a 4D-method exported and zipped, so the browser doesn't try to display.

4D themes: fresh from the workbench

imagecurrently available in englisch:
NEW: Macros in V12.4
Mission Control and V12

Better machine-translated than non comprende! - Tidy up when done - New kinds of buttons - My own Preferences - DBZ-Calendar component - module-manager and code-blocks - As simple as possible: fulltext-field - V12 and QUERY BY SQL - Updating the User-Interface into today - Rotate Barcodes by 90° - UUID: that special kind of empty - Dynamic Labels - Printing Subforms in V12 - systemtables - structure info - Integrating Addressbook and 4D - SVG and 4D HTML-Tag - Automatic Comments of the Methodeditor - fighting to get ics-files into Outlook - hierarchical lists as datacontainer - UI-changes in V12 - HTML-email and 4D Write - Simple & Lazy - David Dancy … extracting the information that's encoded in a 4D structure file - SVG and 4D - David Adams about Mockup and Wireframing - retrieving MAC-addresses - sampler listbox-templates - Listboxes with footers - Simulating Sub-Pages on Multi-Page Forms - MySQL dump - Dreaming of a rich-text-editor in 4D - iPhone and 4D - email-communication - 4D Write and HTML - Which Web-Editor - Integration of 4D and Web - Cursor-movement in Listboxes - Integrating an Excel-workflow into 4D - Database Photography - Parcels and Ownerinformation atop satellite maps


  • DBZ - Listboxnavigator
  • DBZ - SystemTables
  • DBZ - Calendar