Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Dragging & Dropping

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

Using VFP9sp2, I need some pointers on the layout of a drag & drop VFP application.

The application is an "Accounts Payables" module that contains images of invoices. The images will be scanned into an "InTray" which would contain invoices for multiple vendors. I plan to use a "seperator" page to indicate all the pages that pertains to a single multi-page invoice during the scanning process. At this point they have not been assigned to any AP record.

I want to drag those images into its related vendor treeview folder node, while renamng the image and creating the AP record all in the same drop process.

Another option I'd like to do is... lets say that the left side of the form contains the data for an invoice such as InvDate, amount, and terms, as well as an drop area that would receive the images dragged in from the InTray. What vfp object would I use for the drop area. Also note that this all needs to be done inside the vfp app, and not from explorer.

I've been playing around with the OLE drag & drop pems a bit.

Anyone done this sort of stuff before?

Also note that this destined to SQL server a little later on...

Any ideas, suggestions are highly encouraged.

Thanks, Stanley
 
Sean,

>it integrates seamlessly with the VFP form , has a very complete set of events.methods etc.

Yes, I'm impressed so far, at least from an explorer point of view, as that is why I've decided to buy.

I'm sure that any of the needed vfp code would run nicely in its pems. Correct??

Thanks, Stanley
 
Sean,

When I try......

thisform.text1.Value = thisform.foldV.SelectedNode.Path
thisform.text1.refresh

it is displaying the previously selected node's name. Its always one node behind, unless you click it twice to change its name. In that case it is correct even without changing the name.

I'm expecting the textbox to display the name of the selected treeview node.

Any idea?
 
Sean,

I have the code above in the foldV's click event...

Stanley
 
Sean,

And what is the property that contains the name of the selected filename in the FileView control in both
1. single selected file mode, and
2. multi-selected file mode?

thisform.text1.value=?????

How would multi-selected files be referenced and processed in the drop event?

Thanks, Stanley





 
Stanley , the help CHM file is stuffed with examples of " How do I do this/that/other" . The sample code is VB but is easy to convert to vfp , see below. So , go to Help , Developers guide and dig in ... best way to learn it .

e.g. to enumerate through multi-selected files ...

Dim x As FileViewControl.ListItem
Set x = FileView1.FirstSelectedItem
While x Is Nothing = False
Debug.Print x.DisplayName
Set x = FileView1.NextSelectedItem
Wend


 
Stanley , one final item ... ideally you would probably like to drag MULTIPLE items from Inbox to Target. You can do that , but it will be very tricky to do " some kind of processing " with each of the individual items. As second best , you can disallow multiple items drag from the Inbox ( set AllowMultipleSelection property to false, drag single items , and use the OnAfterItemAdd event of the Target folder , to do any of the code to rename ,add to AP tables etc. Should do the biz , I think
 
> it seems with ole/vfp to be very problematic to drop anything other than plain text).

Is this true?

I've done it, and the hard part is understanding how the pieces fit together. Once you get it, it's not bad.

I know I've written about this, but I can't figure where other than in the Hacker's Guide. (I'm sure I wrote a more detailed piece.)

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top