ui.DragDrop.SelectMimeType()

selectMimeType() is used to get sure that the data is available in the format specified by the MIME type. The MIME type is passed to the method as a string value and the program checks whether the data in the drag-and-drop buffer are stored using this type.

The method returns TRUE, if the type of the data is available in the buffer. If the method returns TRUE, you can use getBuffer() to return the data from the buffer.  

selectMimeType() is commonly used in ON DRAG_ENTER and ON DRAG_OVER clauses to cancel the drag-and-drop operation in cases when there are no supported MIME types in the buffer.

Later, in the ON DROP block, you can check which MIME type was selected previously using the getSelectedMimeType() method, get the data from the drag-and-drop buffer using getBuffer()and then insert the new rows to the target fields.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.