Posts Tagged ‘listbox’

Using new functionality drag and drop with 4D list boxes?

Watch out for this: only the entire listbox object can be made draggable/droppable from the actions pane of the object properties.

Even though a listbox is made of headers and column rows, a drag from cells to the header will show as invalid at the UI level. If the user tries to drop it on a header 4D will still go into the list box object method On drop form event.

Moving the on drop code to the columns object method inside the list box has no effect. Dropping a cell onto a header still throws the On drop event.

OK is of no help either, it is 1 regardless of drop target. If Drop position returns -1 seems to be the only indicator a header row was dropped on. A 0 indicates dropping the cell beyond the populated values.

Either way it is frustrating to program around. How about a Get current target method, or change drag and drop properties function call. To state that the current object method executing is the drop target is clearly not granular enough to differentiate from data rows and header rows.

I should also note that returning -1 from On Drag Over event prevents any code from executing On Drop and displays the invalid drop target icon.

` old way
DRAG AND DROP PROPERTIES ( srcObject ; srcElement ; srcProcess )
` new way
DRAG AND DROP PROPERTIES ( srcObject ; srcElement ; srcProcess ; tarObject ; tarElement ; tarProcess )

Read Full Post »

%d bloggers like this: