Line: 1 to 1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
Drag & Drop SupportYou can now define a Widget as the target of a drag & drop operation. | |||||||||
Deleted: | |||||||||
< < | Note: Screen shots and more detailed information will be provided as these details are finalized. | ||||||||
Overview: | |||||||||
Changed: | |||||||||
< < | You can now define certain Widget types (Buttons, Labels, others?) as targets of a drag & drop operation. This means the user can drag a file or other object to an Appx Widget & drop it. | ||||||||
> > | You can now define certain Widget types (Buttons, Labels, etc.) as targets of a drag & drop operation. This means the user can drag a file or other object to an Appx Widget & drop it. | ||||||||
Creating Drop Target | |||||||||
Changed: | |||||||||
< < | Define a field on your image, then use the GUI Attributes to set a Control type, such as BUTTON, LABEL, etc, depending on your requirements. In Pre-Display, set --- WIDGET DROP TARGET to "Y" and set --- WIDGET FI CHOOSE MODE to one of the following:
| ||||||||
> > | Define a LABEL, BUTTON, or FIELD object on your image. (NOTE: If you use a FIELD, you can select from the various normal control types, but be aware that the field value will not be automatically modified by the drag & drop operation).
On the object Properties screen, check the "Drop?" box, and set the Chooser Mode to one of the following:
| ||||||||
Drop Target at Runtime | |||||||||
Changed: | |||||||||
< < | When the user drops an object (file/folder/email message/etc) on the drop target, Appx will populate 2 files and then set --- OPTION to <DROP/OPTION DROP/or something> (numeric value 335). The files are: --- DROPINFO which will contain one record for every object dropped and --- DROPPROP which will contain multiple records for each object dropped. Both of these files are keyed by the --- WIDGET IMAGE KEY, so if you have more than one drop target on your image, you can differentiate them. | ||||||||
> > | When the user drops an object (file/folder/email message/etc) on the drop target, Appx will populate 2 files and then set --- OPTION to DROP. The files are: --- DROPINFO which will contain one record for every object dropped and --- DROPPROP which will contain multiple records for each object dropped, if there is additional information for the object type. Both of these files are keyed by the --- WIDGET KEY, so if you have more than one drop target on your image, you can differentiate them.
The DROPINFO file | ||||||||
Changed: | |||||||||
< < | The --- DROPINFO PATHNAME contains the full path to the object the user dropped. The --- DROPPROP file is a child file of --- DROPINFO and contains multiple records for each object. The specific data varies depending on the type of object dropped. The --- DROPPROP KEYWORD identifies a specific property, and --- DROPPROP VALUE contains the value of that property. | ||||||||
> > | The --- DROPINFO file consists of the following:
SET --- TEMP 512 = " APPEND --- TEMP 512 0 --- DROPINFO PATH APPEND --- TEMP 512 0 " PASS --- TEMP 512 FIELD SHARE? N GOSUB --- .CLIENT LOAD URL | ||||||||
Changed: | |||||||||
< < | For example, if a file from the users desktop is dropped, --- DROPINFO PATHNAME might contain something like "C:\Documents and Settings\jean\Desktop\VolumeC.txt" and --- DROPPROP might contain the following keywords and values: | ||||||||
> > | (We enclose the name in quotes in case it contains a space.)
The DROPPROP file | ||||||||
Changed: | |||||||||
< < |
| ||||||||
> > | The --- DROPPROP file is a child file of --- DROPINFO and contains multiple records for each object, depending on the type of object dropped. The --- DROPPROP KEYWORD identifies a specific property, and --- DROPPROP VALUE contains the value of that property. | ||||||||
Changed: | |||||||||
< < | An Email message might have the following ---- DROPPROP keywords and values: | ||||||||
> > | For example, an Email message might have the following ---- DROPPROP keywords and values: | ||||||||
| |||||||||
Line: 41 to 55 | |||||||||
| |||||||||
Added: | |||||||||
> > | Additional Information | ||||||||
Changed: | |||||||||
< < | DROPINFO PATHNAME would contain the path to open and read the dropped item. You could also use this to open the file via .CLIENT LOAD URL: | ||||||||
> > | These files are cleared every time the image is displayed to the user, and every time a new object is dropped. If you do not process or save the information each time, the previous data will be lost. | ||||||||
Changed: | |||||||||
< < | SET --- TEMP 512 = " APPEND --- TEMP 512 0 --- DROPINFO PATHNAME APPEND --- TEMP 512 0 " PASS --- TEMP 512 FIELD SHARE? N GOSUB --- .CLIENT LOAD URL | ||||||||
> > | Email messages and attachments are copied to the location specified by 'dropCachePath', and then that path is returned to your program. 'dropCachePath' defaults to $(cachePath)\Drop.
Example: | ||||||||
Changed: | |||||||||
< < | We enclose the name in quotes in case it contains a space. | ||||||||
> > | This feature allows APPX designers to enhance a File Chooser field to allow a user to either browse to a desired file or drag-and-drop it. | ||||||||
Changed: | |||||||||
< < | Note that these files are cleared every time the image is displayed to the user. If you do not process or save the information each time, the previous data will be lost. | ||||||||
> > | If the target file chooser field is TEMP 256 and the widget name is MY-FILE-CHOOSER, insert this ILF code in Option Intercept:
IF --- OPTION EQ DROP T SET --- WIDGET KEY = --- DROPINFO WIDGET KEY T READ --- WIDGET HOLD 0 FT 0 BY WIDGET KEY TT IF --- WIDGET NAME EQ MY-FILE-CHOOSER TTT SET --- TEMP 256 = --- DROPINFO PATH TTT DISPLAY --- TEMP 256 (AT APPEARANCE # ) | ||||||||
Deleted: | |||||||||
< < | Email messages and attachments are copied to the location specified by 'dropCachePath', and then that path is returned to your program. 'dropCachePath' defaults to $(cachePath)\Drop. | ||||||||
Comments:Read what other users have said about this page or add your own comments. | |||||||||
Line: 63 to 80 | |||||||||
-- JeanNeron - 2012-06-14 | |||||||||
Added: | |||||||||
> > |
|